{"version":3,"sources":["webpack:///./src/eventbus/event-bus.js","webpack:///./src/components/Apis/ModalDeleteLocation.vue","webpack:///src/components/Apis/ModalDeleteLocation.vue","webpack:///./src/components/Apis/ModalDeleteLocation.vue?47e8","webpack:///./src/components/Apis/ModalDeleteLocation.vue?8b88"],"names":["EventBus","Vue","render","_vm","this","_c","_self","attrs","$t","isDeleting","isDeletingSuccess","isDeletingError","onClickCancel","deleteLocationAccess","isDeleteConfirmed","showModal","on","scopedSlots","_u","key","fn","staticClass","model","value","callback","$$v","expression","proxy","slot","staticRenderFns","components","BaseCheckbox","props","type","Boolean","default","Function","required","apiLocation","Object","data","computed","_objectSpread","mapState","created","methods","_this","self","applicationProvider","deleteApplicationLocation","application","Id","LocationId","then","response","status","$emit","component"],"mappings":"oJAAA,kDACaA,EAAW,IAAIC,aAEbD,U,yCCHf,IAAIE,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAa,GAAG,sBAAwB,YAAY,mBAAqBJ,EAAIK,GAAG,uBAAuB,SAAWL,EAAIM,WAAW,gBAAkBN,EAAIO,kBAAkB,cAAgBP,EAAIQ,gBAAgB,kBAAoBR,EAAIQ,iBAAmBR,EAAIO,kBAAkB,cAAgBP,EAAIS,cAAc,YAAcT,EAAIU,qBAAqB,mBAAqBV,EAAIW,kBAAkB,UAAYX,EAAIY,WAAWC,GAAG,CAAC,WAAab,EAAIS,eAAeK,YAAYd,EAAIe,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACf,EAAG,MAAM,CAACgB,YAAY,qBAAqB,CAAChB,EAAG,eAAe,CAACgB,YAAY,gBAAgBd,MAAM,CAAC,MAAQJ,EAAIK,GAAG,2DAA2Dc,MAAM,CAACC,MAAOpB,EAAIW,kBAAmBU,SAAS,SAAUC,GAAMtB,EAAIW,kBAAkBW,GAAKC,WAAW,wBAAwB,KAAKC,OAAM,MAAS,CAACtB,EAAG,WAAW,CAACuB,KAAK,gBAAgB,IAE17BC,EAAkB,G,gFCgCP,GACfC,WAAA,CACAC,aAAA,8EAGAC,MAAA,CACAjB,UAAA,CACAkB,KAAAC,QACAC,SAAA,GAGAvB,cAAA,CACAqB,KAAAG,SACAC,UAAA,GAGAC,YAAA,CACAL,KAAAM,OACAJ,QAAA,OAIAK,KAAA,WACA,OACA1B,mBAAA,EACAL,YAAA,EACAC,mBAAA,EACAC,iBAAA,IAIA8B,SAAAC,eAAA,GACAC,eAAA,qCAGAC,QAAA,aAEAC,QAAA,CACAhC,qBAAA,eAAAiC,EAAA,KACAC,EAAA,KAEAA,EAAAtC,aACAsC,EAAAtC,YAAA,EAEAuC,OAAAH,QACAI,0BACA,KAAAC,YAAAC,GACA,KAAAb,YAAAc,YAEAC,MAAA,SAAAC,GACA,MAAAA,EAAAC,SACAT,EAAAU,MAAA,kBAAAV,EAAAR,aAEAS,EAAAnC,wBCvF2W,I,YCOvW6C,EAAY,eACd,EACAvD,EACA2B,GACA,EACA,KACA,KACA,MAIa,aAAA4B,E","file":"js/chunk-203a8aac.js?id=16288f681a4007f3cf70","sourcesContent":["import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":\"\",\"confirmButtonCssClass\":\"is-danger\",\"buttonLabelConfirm\":_vm.$t('Form.Control.Delete'),\"isSaving\":_vm.isDeleting,\"isSavingSuccess\":_vm.isDeletingSuccess,\"isSavingError\":_vm.isDeletingError,\"hideFooterButtons\":_vm.isDeletingError || _vm.isDeletingSuccess,\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.deleteLocationAccess,\"disableSaveButton\":!_vm.isDeleteConfirmed,\"showModal\":_vm.showModal},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('div',{staticClass:\"has-text-centered\"},[_c('BaseCheckbox',{staticClass:\"has-text-left\",attrs:{\"label\":_vm.$t('Components.Reservation.ModalDeleteOption.Label_YesSure')},model:{value:(_vm.isDeleteConfirmed),callback:function ($$v) {_vm.isDeleteConfirmed=$$v},expression:\"isDeleteConfirmed\"}})],1)]},proxy:true}])},[_c('template',{slot:\"modalTitle\"})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    modalTitle=\"\"\n    confirmButtonCssClass=\"is-danger\"\n    :buttonLabelConfirm=\"$t('Form.Control.Delete')\"\n    :isSaving=\"isDeleting\"\n    :isSavingSuccess=\"isDeletingSuccess\"\n    :isSavingError=\"isDeletingError\"\n    :hideFooterButtons=\"isDeletingError || isDeletingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"deleteLocationAccess\"\n    :disableSaveButton=\"!isDeleteConfirmed\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\"></template>\n    <template v-slot:content>\n      <div class=\"has-text-centered\">\n        <BaseCheckbox\n          v-model=\"isDeleteConfirmed\"\n          class=\"has-text-left\"\n          :label=\"$t('Components.Reservation.ModalDeleteOption.Label_YesSure')\"\n        />\n      </div>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { mapState } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport applicationProvider from '@/providers/application'\n\nexport default {\n  components: {\n    BaseCheckbox: () => import('@/components/UI/Form/BaseCheckbox'),\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    apiLocation: {\n      type: Object,\n      default: null,\n    },\n  },\n\n  data() {\n    return {\n      isDeleteConfirmed: false,\n      isDeleting: false,\n      isDeletingSuccess: false,\n      isDeletingError: false,\n    }\n  },\n\n  computed: {\n    ...mapState('applicationStore', ['application']),\n  },\n\n  created() {},\n\n  methods: {\n    deleteLocationAccess() {\n      let self = this\n\n      if (!self.isDeleting) {\n        self.isDeleting = true\n\n        applicationProvider.methods\n          .deleteApplicationLocation(\n            this.application.Id,\n            this.apiLocation.LocationId\n          )\n          .then((response) => {\n            if (response.status === 204) {\n              this.$emit('locationDeleted', this.apiLocation)\n\n              self.onClickCancel()\n            }\n          })\n      }\n    },\n  },\n}\n</script>\n","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!./ModalDeleteLocation.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!./ModalDeleteLocation.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalDeleteLocation.vue?vue&type=template&id=3052784c\"\nimport script from \"./ModalDeleteLocation.vue?vue&type=script&lang=js\"\nexport * from \"./ModalDeleteLocation.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  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}