{"version":3,"sources":["webpack:///src/components/Apis/ModalDeleteLocation.vue","webpack:///./src/components/Apis/ModalDeleteLocation.vue","webpack:///./src/components/Apis/ModalDeleteLocation.vue?8b88","webpack:///./src/components/Apis/ModalDeleteLocation.vue?17d5","webpack:///./src/components/Apis/ModalDeleteLocation.vue?f8b0","webpack:///./src/eventbus/event-bus.js"],"names":["components","BaseCheckbox","props","showModal","type","Boolean","default","onClickCancel","Function","required","apiLocation","Object","data","isDeleteConfirmed","isDeleting","isDeletingSuccess","isDeletingError","computed","_objectSpread","mapState","created","methods","deleteLocationAccess","_this","self","applicationProvider","deleteApplicationLocation","application","Id","LocationId","then","response","status","$emit","render","_vm","_c","_self","attrs","modalTitle","confirmButtonCssClass","buttonLabelConfirm","$t","isSaving","isSavingSuccess","isSavingError","hideFooterButtons","onClickSave","disableSaveButton","on","closeModal","scopedSlots","_u","key","fn","staticClass","label","model","value","callback","$$v","expression","proxy","slot","staticRenderFns","_withStripped","EventBus","Vue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AACA;AACA;AAEe;EACfA,UAAA;IACAC,YAAA,WAAAA,aAAA;MAAA;IAAA;EACA;EAEAC,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,OAAA;MACAC,OAAA;IACA;IAEAC,aAAA;MACAH,IAAA,EAAAI,QAAA;MACAC,QAAA;IACA;IAEAC,WAAA;MACAN,IAAA,EAAAO,MAAA;MACAL,OAAA;IACA;EACA;EAEAM,IAAA,WAAAA,KAAA;IACA;MACAC,iBAAA;MACAC,UAAA;MACAC,iBAAA;MACAC,eAAA;IACA;EACA;EAEAC,QAAA,EAAAC,iIAAA,KACAC,6DAAA,sCACA;EAEAC,OAAA,WAAAA,QAAA;EAEAC,OAAA;IACAC,oBAAA,WAAAA,qBAAA;MAAA,IAAAC,KAAA;MACA,IAAAC,IAAA;MAEA,KAAAA,IAAA,CAAAV,UAAA;QACAU,IAAA,CAAAV,UAAA;QAEAW,sEAAA,CAAA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EACpC,CACEnB,EAAE,CAAC,cAAc,EAAE;UACjBmB,WAAW,EAAE,eAAe;UAC5BjB,KAAK,EAAE;YACLkB,KAAK,EAAErB,GAAG,CAACO,EAAE,CACX,wDACF;UACF,CAAC;UACDe,KAAK,EAAE;YACLC,KAAK,EAAEvB,GAAG,CAACtB,iBAAiB;YAC5B8C,QAAQ,EAAE,SAAVA,QAAQA,CAAYC,GAAG,EAAE;cACvBzB,GAAG,CAACtB,iBAAiB,GAAG+C,GAAG;YAC7B,CAAC;YACDC,UAAU,EAAE;UACd;QACF,CAAC,CAAC,CACH,EACD,CACF,CAAC,CACF;MACH,CAAC;MACDC,KAAK,EAAE;IACT,CAAC,CACF;EACH,CAAC,EACD,CAAC1B,EAAE,CAAC,UAAU,EAAE;IAAE2B,IAAI,EAAE;EAAa,CAAC,CAAC,CAAC,EACxC,CACF,CAAC;AACH,CAAC;AACD,IAAIC,eAAe,GAAG,EAAE;AACxB9B,MAAM,CAAC+B,aAAa,GAAG,IAAI;;;;;;;;;;;;;;AC1D3B;AAAA;AAAA;AAAA;AAAiG;AAC3B;AACL;;;AAGjE;AAC6F;AAC7F,gBAAgB,mHAAU;AAC1B,EAAE,gGAAM;AACR,EAAE,qGAAM;AACR,EAAE,8GAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAA2S,CAAgB,qVAAG,EAAC,C;;;;;;;;;;;;;ACA/T;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;ACAA;AAAA;AAAqB;AACd,IAAMC,QAAQ,GAAG,IAAIC,2CAAG,CAAC,CAAC;AAElBD,iEAAQ,E","file":"js/287.js?id=9cc1aaab526bd106aeda","sourcesContent":["<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","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\n    \"ui-component-modal\",\n    {\n      attrs: {\n        modalTitle: \"\",\n        confirmButtonCssClass: \"is-danger\",\n        buttonLabelConfirm: _vm.$t(\"Form.Control.Delete\"),\n        isSaving: _vm.isDeleting,\n        isSavingSuccess: _vm.isDeletingSuccess,\n        isSavingError: _vm.isDeletingError,\n        hideFooterButtons: _vm.isDeletingError || _vm.isDeletingSuccess,\n        onClickCancel: _vm.onClickCancel,\n        onClickSave: _vm.deleteLocationAccess,\n        disableSaveButton: !_vm.isDeleteConfirmed,\n        showModal: _vm.showModal,\n      },\n      on: { closeModal: _vm.onClickCancel },\n      scopedSlots: _vm._u([\n        {\n          key: \"content\",\n          fn: function () {\n            return [\n              _c(\n                \"div\",\n                { staticClass: \"has-text-centered\" },\n                [\n                  _c(\"BaseCheckbox\", {\n                    staticClass: \"has-text-left\",\n                    attrs: {\n                      label: _vm.$t(\n                        \"Components.Reservation.ModalDeleteOption.Label_YesSure\"\n                      ),\n                    },\n                    model: {\n                      value: _vm.isDeleteConfirmed,\n                      callback: function ($$v) {\n                        _vm.isDeleteConfirmed = $$v\n                      },\n                      expression: \"isDeleteConfirmed\",\n                    },\n                  }),\n                ],\n                1\n              ),\n            ]\n          },\n          proxy: true,\n        },\n      ]),\n    },\n    [_c(\"template\", { slot: \"modalTitle\" })],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ModalDeleteLocation.vue?vue&type=template&id=713885a7\"\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\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/github/workspace/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('713885a7')) {\n      api.createRecord('713885a7', component.options)\n    } else {\n      api.reload('713885a7', component.options)\n    }\n    module.hot.accept(\"./ModalDeleteLocation.vue?vue&type=template&id=713885a7\", function () {\n      api.rerender('713885a7', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Apis/ModalDeleteLocation.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../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/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 * from \"-!../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"381a4baa-vue-loader-template\\\"}!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalDeleteLocation.vue?vue&type=template&id=713885a7\"","import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n"],"sourceRoot":""}