{"version":3,"sources":["webpack:///./src/components/Profiles/ModalDeleteAddress.vue","webpack:///src/components/Profiles/ModalDeleteAddress.vue","webpack:///./src/components/Profiles/ModalDeleteAddress.vue?7044","webpack:///./src/components/Profiles/ModalDeleteAddress.vue?6a69"],"names":["render","_vm","this","_c","_self","attrs","$t","isDeleting","isDeleteConfirmed","isDeletingError","isDeletingSuccess","onClickCancel","deleteAddress","showModal","on","scopedSlots","_u","key","fn","staticClass","domProps","_s","model","value","callback","$$v","expression","proxy","staticRenderFns","components","BaseCheckbox","Modal","props","type","Boolean","default","Function","required","address","Object","data","mounted","created","computed","methods","_this","profileProvider","deleteProfileBillingAddress","Id","then","$emit","catch","finally","watch","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,QAAQ,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAAG,uDAAuD,sBAAwB,YAAY,mBAAqBL,EAAIK,GAAG,uBAAuB,SAAWL,EAAIM,WAAW,mBAAqBN,EAAIO,mBAAqBP,EAAIM,WAAW,kBAAoBN,EAAIQ,iBAAmBR,EAAIS,kBAAkB,cAAgBT,EAAIU,cAAc,YAAcV,EAAIW,cAAc,UAAYX,EAAIY,WAAWC,GAAG,CAAC,WAAab,EAAIU,eAAeI,YAAYd,EAAIe,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACf,EAAG,MAAM,CAACgB,YAAY,gDAAgDC,SAAS,CAAC,UAAYnB,EAAIoB,GAClqBpB,EAAIK,GAAG,4DACJH,EAAG,MAAM,CAACgB,YAAY,qBAAqB,CAAChB,EAAG,eAAe,CAACgB,YAAY,gBAAgBd,MAAM,CAAC,MAAQJ,EAAIK,GAAG,sDAAsDgB,MAAM,CAACC,MAAOtB,EAAIO,kBAAmBgB,SAAS,SAAUC,GAAMxB,EAAIO,kBAAkBiB,GAAKC,WAAW,wBAAwB,KAAKC,OAAM,QAErTC,EAAkB,G,4CC8BP,GACfC,WAAA,CACAC,aAAA,6EACAC,MAAA,oEAGAC,MAAA,CACAnB,UAAA,CACAoB,KAAAC,QACAC,SAAA,GAGAxB,cAAA,CACAsB,KAAAG,SACAC,UAAA,GAGAC,QAAA,CACAL,KAAAM,OACAJ,QAAA,uBAIAK,KAAA,WACA,OACAhC,mBAAA,EACAD,YAAA,EACAG,mBAAA,EACAD,iBAAA,IAIAgC,QAAA,aAGAC,QAAA,aAGAC,SAAA,GAGAC,QAAA,CACAhC,cAAA,eAAAiC,EAAA,MACA,KAAAtC,YAAA,KAAAC,oBAIA,KAAAD,YAAA,EAEAuC,OAAAF,QAAAG,4BAAA,KAAAT,QAAAU,IACAC,MAAA,WACAJ,EAAAnC,mBAAA,EACAmC,EAAAK,MAAA,kBACAL,EAAAlC,mBAEAwC,OAAA,WACAN,EAAApC,iBAAA,KAEA2C,SAAA,WACAP,EAAAtC,YAAA,QAKA8C,MAAA,IClG0W,I,YCOtWC,EAAY,eACd,EACAtD,EACA4B,GACA,EACA,KACA,WACA,MAIa,aAAA0B,E","file":"js/chunk-2d0d2ea2.js?id=cd5a593a965fe86e2a94","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Modal',{attrs:{\"modalTitle\":_vm.$t('Components.Profile.ProfileDetail.header_EditProfile'),\"confirmButtonCssClass\":\"is-danger\",\"buttonLabelConfirm\":_vm.$t('Form.Control.Delete'),\"isSaving\":_vm.isDeleting,\"disableSaveButton\":!_vm.isDeleteConfirmed || _vm.isDeleting,\"hideFooterButtons\":_vm.isDeletingError || _vm.isDeletingSuccess,\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.deleteAddress,\"showModal\":_vm.showModal},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('div',{staticClass:\"has-margin-bottom is-size-5 has-text-centered\",domProps:{\"innerHTML\":_vm._s(\n        _vm.$t('Components.Profile.BillingAddress.text_DeleteAddress')\n      )}}),_c('div',{staticClass:\"has-text-centered\"},[_c('BaseCheckbox',{staticClass:\"has-text-left\",attrs:{\"label\":_vm.$t('Components.Options.ModalDeleteOption.Text_YesSure')},model:{value:(_vm.isDeleteConfirmed),callback:function ($$v) {_vm.isDeleteConfirmed=$$v},expression:\"isDeleteConfirmed\"}})],1)]},proxy:true}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <Modal\n    :modalTitle=\"$t('Components.Profile.ProfileDetail.header_EditProfile')\"\n    confirmButtonCssClass=\"is-danger\"\n    :buttonLabelConfirm=\"$t('Form.Control.Delete')\"\n    :isSaving=\"isDeleting\"\n    :disableSaveButton=\"!isDeleteConfirmed || isDeleting\"\n    :hideFooterButtons=\"isDeletingError || isDeletingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"deleteAddress\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template v-slot:content>\n      <div\n        class=\"has-margin-bottom is-size-5 has-text-centered\"\n        v-html=\"\n          $t('Components.Profile.BillingAddress.text_DeleteAddress')\n        \"\n      ></div>\n      <div class=\"has-text-centered\">\n        <BaseCheckbox\n          v-model=\"isDeleteConfirmed\"\n          class=\"has-text-left\"\n          :label=\"$t('Components.Options.ModalDeleteOption.Text_YesSure')\"\n        />\n      </div>\n    </template>\n  </Modal>\n</template>\n\n<script>\nimport profileProvider from '@/providers/profile'\n\nexport default {\n  components: {\n    BaseCheckbox: () => import('@/components/UI/Form/BaseCheckbox.vue'),\n    Modal: () => import('@/components/UI/Components/Modal'),\n  },\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n\n    address: {\n      type: Object,\n      default: () => ({}),\n    }\n  },\n\n  data () {\n    return {\n      isDeleteConfirmed: false,\n      isDeleting: false,\n      isDeletingSuccess: false,\n      isDeletingError: false,\n    }\n  },\n\n  mounted () {\n  },\n\n  created () {\n  },\n\n  computed: {\n  },\n\n  methods: {\n    deleteAddress() {\n      if (this.isDeleting || !this.isDeleteConfirmed) {\n        return;\n      }\n\n      this.isDeleting = true;\n\n      profileProvider.methods.deleteProfileBillingAddress(this.address.Id)\n        .then(() => {\n          this.isDeletingSuccess = true;\n          this.$emit('addressDeleted');\n          this.onClickCancel();\n        })\n        .catch(() => {\n            this.isDeletingError = true\n          })\n        .finally(() => {\n          this.isDeleting = false;\n        });\n    }\n  },\n\n  watch: {\n  }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalDeleteAddress.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalDeleteAddress.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalDeleteAddress.vue?vue&type=template&id=f8aac2ba&scoped=true\"\nimport script from \"./ModalDeleteAddress.vue?vue&type=script&lang=js\"\nexport * from \"./ModalDeleteAddress.vue?vue&type=script&lang=js\"\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  \"f8aac2ba\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}