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AAG,SAAS,CAACG,YAAY,WAAWC,MAAM,CAAC,KAAO,SAAS,SAAWL,EAAIlB,YAAY,CAACkB,EAAIyB,GAAGzB,EAAI0B,GAAG1B,EAAIb,GAAG,yBAAyB,GAAG,QAAQ,EACnoF,EACIqD,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/default/FooterSubscribe.vue?12c3","webpack:///./resources/area/web/default/js/components/default/FooterSubscribe.vue","webpack:///./resources/area/web/default/js/components/default/FooterSubscribe.vue?ac8d","webpack:///./resources/area/web/default/js/components/default/FooterSubscribe.vue?b5ec"],"sourcesContent":["\nimport {Component, Prop, Vue} from 'vue-property-decorator';\nimport {ValidationProvider, ValidationObserver, extend} from 'vee-validate';\nimport {email, required} from 'vee-validate/dist/rules';\n\nextend('required', required);\nextend('email', email);\n\n@Component({\n  name: 'footer-subscribe',\n  components: {\n    ValidationProvider,\n    ValidationObserver\n  }\n})\n\nexport default class extends Vue {\n  @Prop({required: true}) privacyLabel: string;\n  @Prop({required: true}) privacyUrl: string;\n\n  private email: string = '';\n  private message: string = '';\n  private success: string | null = null;\n  private isLoading: boolean = false;\n  private privacyAccept: boolean = false;\n\n  private acceptError: string ='';\n\n  private async doSubscribe() {\n    this.isLoading = true;\n\n    if(!this.privacyAccept){\n      this.acceptError = this.$t('Privacy checkbox is required') as string\n    } else{\n      this.acceptError = '';\n    }\n    try {\n      const {data} = await this.$mageClient.post(`/api/newsletter/subscribe`, {email: this.email});\n      this.message = data.message;\n      this.success = data.success;\n    } catch (e) {\n      // this.email = '';\n    } finally {\n      this.isLoading = false;\n      setTimeout(() => {\n        this.message = '';\n        this.success = null;\n      }, 4000);\n    }\n  }\n}\n","import { render, staticRenderFns } from \"./FooterSubscribe.vue?vue&type=template&id=35139f6c&\"\nimport script from \"./FooterSubscribe.vue?vue&type=script&lang=ts&\"\nexport * from \"./FooterSubscribe.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","import mod from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FooterSubscribe.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FooterSubscribe.vue?vue&type=script&lang=ts&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"_newsletter-footer\"},[_c('ValidationObserver',{attrs:{\"slim\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ handleSubmit }){return [_c('form',{on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return handleSubmit(_vm.doSubscribe)}}},[_c('ValidationProvider',{staticClass:\"newsletter__input\",attrs:{\"name\":_vm.$t('Email address'),\"rules\":\"required|email\",\"skip-if-empty\":false,\"tag\":\"div\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ errors, classes }){return [_c('div',{staticClass:\"newsletter__container-form\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.email),expression:\"email\"}],class:classes,attrs:{\"type\":\"email\",\"placeholder\":_vm.$t('Email address')},domProps:{\"value\":(_vm.email)},on:{\"input\":function($event){if($event.target.composing)return;_vm.email=$event.target.value}}})]),_vm._v(\" \"),_c('div',{staticClass:\"_error\"},[_c('span',{staticClass:\"field-error\"},[_vm._v(_vm._s(_vm.$t(errors[0])))]),_vm._v(\" \"),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(null !== _vm.success),expression:\"null !== success\"}],class:_vm.success ? 'field-success' : 'field-error'},[_vm._v(_vm._s(_vm.message))])])]}}],null,true)}),_vm._v(\" \"),_c('div',{staticClass:\"footer__checkbox\"},[_c('span',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.privacyAccept),expression:\"privacyAccept\"}],attrs:{\"id\":\"privacyCheck\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.privacyAccept)?_vm._i(_vm.privacyAccept,null)>-1:(_vm.privacyAccept)},on:{\"change\":function($event){var $$a=_vm.privacyAccept,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.privacyAccept=$$a.concat([$$v]))}else{$$i>-1&&(_vm.privacyAccept=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.privacyAccept=$$c}}}}),_vm._v(\" \"),_c('label',{attrs:{\"for\":\"privacyCheck\"}},[_vm._v(_vm._s(_vm.$t('I accept'))+\" \"),_c('a',{attrs:{\"target\":\"_blank\",\"href\":_vm.privacyUrl}},[_vm._v(_vm._s(_vm.privacyLabel))])])]),_vm._v(\" \"),(_vm.acceptError)?_c('div',{staticClass:\"_error\"},[_c('span',{staticClass:\"field-error\"},[_vm._v(_vm._s(_vm.acceptError))]),_vm._v(\" \"),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(null !== _vm.success),expression:\"null !== success\"}],class:_vm.success ? 'field-success' : 'field-error'},[_vm._v(_vm._s(_vm.message))])]):_vm._e()]),_vm._v(\" \"),_c('button',{staticClass:\"--button\",attrs:{\"type\":\"submit\",\"disabled\":_vm.isLoading}},[_vm._v(_vm._s(_vm.$t('Yes i subscribe!')))])],1)]}}])})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["extend","required","email","Vue","message","success","isLoading","privacyAccept","acceptError","doSubscribe","this","$t","data","$mageClient","post","e","setTimeout","Prop","Component","name","components","ValidationProvider","ValidationObserver","render","_vm","_c","_self","_setupProxy","staticClass","attrs","scopedSlots","_u","key","fn","handleSubmit","on","$event","preventDefault","stopPropagation","errors","classes","directives","rawName","value","expression","class","domProps","target","composing","_v","_s","Array","isArray","_i","$$a","$$el","$$c","checked","$$i","concat","slice","privacyUrl","privacyLabel","_e","staticRenderFns"],"sourceRoot":""}