(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{130:function(e,t,n){"use strict";n.r(t);var a=n(131),r=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t.default=r.a},131:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},r=c(n(4)),o=n(94),i=n(108),s=c(n(109)),l=c(n(5)),u=c(n(116));function c(e){return e&&e.__esModule?e:{default:e}}n(132),(0,o.localize)("bg",s.default),(0,o.extend)("required",a({},i.required,{message:"Полето е задължително"})),t.default={components:{DatePicker:u.default},data:function(){return{loading:!1,year:wooBg_export.year,i18n:wooBg_export.i18n,generate_files:!1,message:""}},mounted:function(){e(document.body).trigger("init_tooltips")},methods:{runSubmit:function(){this.loading=!0;var e=this,t={action:"woo_bg_export_nap",year:this.year,generate_files:this.generate_files,nonce:wooBg_export.nonce};r.default.post(woocommerce_admin.ajax_url,l.default.stringify(t)).then((function(t){t.data.data.message&&(e.message=t.data.data.message),e.loading=!1})).catch((function(t){e.message="Имаше проблем със запазването на настройките. За повече информация вижте конзолата.",console.log(t),e.loading=!1}))}}}}).call(this,n(0))},252:function(e,t,n){"use strict";n.r(t);var a=n(269),r=n(130);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var i=n(86),s=Object(i.a)(r.default,a.a,a.b,!1,null,null,null);t.default=s.exports},269:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ajax-container",attrs:{"data-loading":e.loading}},[n("ValidationObserver",{ref:"form",scopedSlots:e._u([{key:"default",fn:function(t){var a=t.handleSubmit;return[n("form",{on:{submit:function(t){return t.preventDefault(),a(e.runSubmit)}}},[e.i18n.description?n("div",{domProps:{innerHTML:e._s(e.i18n.description)}}):e._e(),e._v(" "),n("table",{staticClass:"form-table"},[n("tbody",[n("tr",{attrs:{valign:"top"}},[n("th",{staticClass:"titledesc",attrs:{scope:"row"}},[n("label",{attrs:{for:"woo-bg-company-name"}},[e._v(e._s(e.i18n.choose_month))])]),e._v(" "),n("ValidationProvider",{staticClass:"forminp forminp-text",attrs:{tag:"td",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors;return[n("date-picker",{attrs:{type:"month","value-type":"format"},model:{value:e.year,callback:function(t){e.year=t},expression:"year"}}),e._v(" "),n("p",{staticClass:"field-error"},[e._v(e._s(a[0]))])]}}],null,!0)})],1)])]),e._v(" "),n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.generate_files,expression:"generate_files"}],attrs:{id:"woo-bg-generate_files",type:"checkbox",name:"generate_files"},domProps:{checked:Array.isArray(e.generate_files)?e._i(e.generate_files,null)>-1:e.generate_files},on:{change:function(t){var n=e.generate_files,a=t.target,r=!!a.checked;if(Array.isArray(n)){var o=e._i(n,null);a.checked?o<0&&(e.generate_files=n.concat([null])):o>-1&&(e.generate_files=n.slice(0,o).concat(n.slice(o+1)))}else e.generate_files=r}}}),e._v(" "),n("label",{attrs:{for:"woo-bg-generate_files"}},[e._v(e._s(e.i18n.generated_files))])]),e._v(" "),n("p",{staticClass:"submit"},[n("button",{staticClass:"button-primary woocommerce-save-button",attrs:{name:"save",type:"submit",value:e.i18n.download}},[e._v(e._s(e.i18n.download))]),e._v(" "),e.message?n("span",{staticClass:"form-message",domProps:{innerHTML:e._s(e.message)}}):e._e()])])]}}])})],1)},r=[]},74:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(90);var a=i(n(89)),r=i(n(252)),o=n(94);function i(e){return e&&e.__esModule?e:{default:e}}a.default.component("ValidationProvider",o.ValidationProvider),a.default.component("ValidationObserver",o.ValidationObserver),t.default=new a.default({el:"#woo-bg-exports",render:function(e){return e(r.default)}})}}]);