{"version":3,"sources":["webpack:///src/components/ToDos/ModalDeleteToDo.vue","webpack:///./src/components/ToDos/ModalDeleteToDo.vue","webpack:///./src/components/ToDos/ModalDeleteToDo.vue?9875","webpack:///./src/components/ToDos/ModalDeleteToDo.vue?99c8","webpack:///./src/components/ToDos/ModalDeleteToDo.vue?542f","webpack:///./src/eventbus/event-bus.js"],"names":["BaseCheckbox","components","props","showModal","type","Boolean","default","onClickCancel","Function","required","todo","Object","data","isDeleteConfirmed","isDeletingError","isDeletingSuccess","isDeleting","mToDo","methods","deleteToDo","_this","self","todoProvider","Id","then","response","status","$emit","EventBus","message","$t","catch","error","finally","render","_vm","_c","_self","attrs","modalTitle","confirmButtonCssClass","isSaving","isSavingSuccess","isSavingError","onClickSave","disableSaveButton","hideFooterButtons","buttonLabelConfirm","savingSuccessMessage","savingErrorMessage","on","closeModal","scopedSlots","_u","key","fn","_v","_s","staticClass","label","model","value","callback","$$v","expression","proxy","slot","staticRenderFns","_withStripped","Vue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoCA;AACA;AAEA,IAAAA,YAAA,YAAAA,aAAA;EAAA,OACA,sXAEA;AAAA;AAEe;EACfC,UAAA;IACAD,YAAA,EAAAA;EACA;EAEAE,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,OAAA;MACAC,OAAA;IACA;IACAC,aAAA;MACAH,IAAA,EAAAI,QAAA;MACAC,QAAA;IACA;IACAC,IAAA;MACAN,IAAA,EAAAO,MAAA;MACAL,OAAA;IACA;EACA;EAEAM,IAAA,WAAAA,KAAA;IACA;MACAC,iBAAA;MACAC,eAAA;MACAC,iBAAA;MACAC,UAAA;MACAC,KAAA,OAAAP;IACA;EACA;EAEAQ,OAAA;IACAC,UAAA,WAAAA,WAAA;MAAA,IAAAC,KAAA;MACA,IAAAC,IAAA;MACAA,IAAA,CAAAL,UAAA;MAEAM,+DAAA,CAAAJ,OAAA,CACAC,UAAA,CAAAE,IAAA,CAAAJ,KAAA,CAAAM,EAAA,EAC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;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAAuS,CAAgB,iVAAG,EAAC,C;;;;;;;;;;;;;ACA3T;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;ACAA;AAAA;AAAqB;AACd,IAAMxC,QAAQ,GAAG,IAAIyC,2CAAG,CAAC,CAAC;AAElBzC,iEAAQ,E","file":"js/326.js?id=5995a75ff9423e3605b0","sourcesContent":["<template>\n  <ui-component-modal\n    :modalTitle=\"$t('Components.ToDos.ModalDeleteToDo.Main_Title')\"\n    confirmButtonCssClass=\"is-danger\"\n    :isSaving=\"isDeleting\"\n    :isSavingSuccess=\"isDeletingSuccess\"\n    :isSavingError=\"isDeletingError\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"deleteToDo\"\n    :showModal=\"showModal\"\n    :disableSaveButton=\"!isDeleteConfirmed || isDeleting\"\n    :hideFooterButtons=\"isDeletingError || isDeletingSuccess\"\n    :buttonLabelConfirm=\"$t('Form.Control.Delete')\"\n    :savingSuccessMessage=\"\n      $t('Components.ToDos.ModalDeleteToDo.Message_SavingSuccess')\n    \"\n    :savingErrorMessage=\"\n      $t('Components.ToDos.ModalDeleteToDo.Message_SavingError')\n    \"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\"></template>\n    <template v-slot:content>\n      <div>{{ $t('Components.ToDos.ModalDeleteToDo.Text_Delete') }}</div>\n      <div class=\"has-text-centered\">\n        <BaseCheckbox\n          v-model=\"isDeleteConfirmed\"\n          class=\"has-text-left\"\n          :label=\"$t('Components.ToDos.ModalDeleteToDo.Text_YesSure')\"\n        />\n      </div>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport todoProvider from '@/providers/todo'\nimport EventBus from '@/eventbus/event-bus'\n\nconst BaseCheckbox = () =>\n  import(\n    /* webpackChunkName: \"settings-options\" */ '@/components/UI/Form/BaseCheckbox'\n  )\n\nexport default {\n  components: {\n    BaseCheckbox,\n  },\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n    todo: {\n      type: Object,\n      default: null,\n    },\n  },\n\n  data() {\n    return {\n      isDeleteConfirmed: false,\n      isDeletingError: false,\n      isDeletingSuccess: false,\n      isDeleting: false,\n      mToDo: this.todo,\n    }\n  },\n\n  methods: {\n    deleteToDo() {\n      let self = this\n      self.isDeleting = true\n\n      todoProvider.methods\n        .deleteToDo(self.mToDo.Id)\n        .then((response) => {\n          if (response.status === 204) {\n            self.$emit('todoDeleted', self.mToDo)\n\n            // Send message to be shown as toast on page\n            EventBus.$emit('showToast', {\n              type: 'info',\n              message: this.$t('Components.ToDos.ModalDeleteToDo.Message_SavingSuccess'),\n            })\n\n            this.onClickCancel();\n          }\n        })\n        .catch((error) => {\n          self.isDeletingError = true\n        })\n        .finally(() => {\n          self.isDeleting = false\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: _vm.$t(\"Components.ToDos.ModalDeleteToDo.Main_Title\"),\n        confirmButtonCssClass: \"is-danger\",\n        isSaving: _vm.isDeleting,\n        isSavingSuccess: _vm.isDeletingSuccess,\n        isSavingError: _vm.isDeletingError,\n        onClickCancel: _vm.onClickCancel,\n        onClickSave: _vm.deleteToDo,\n        showModal: _vm.showModal,\n        disableSaveButton: !_vm.isDeleteConfirmed || _vm.isDeleting,\n        hideFooterButtons: _vm.isDeletingError || _vm.isDeletingSuccess,\n        buttonLabelConfirm: _vm.$t(\"Form.Control.Delete\"),\n        savingSuccessMessage: _vm.$t(\n          \"Components.ToDos.ModalDeleteToDo.Message_SavingSuccess\"\n        ),\n        savingErrorMessage: _vm.$t(\n          \"Components.ToDos.ModalDeleteToDo.Message_SavingError\"\n        ),\n      },\n      on: { closeModal: _vm.onClickCancel },\n      scopedSlots: _vm._u([\n        {\n          key: \"content\",\n          fn: function () {\n            return [\n              _c(\"div\", [\n                _vm._v(\n                  _vm._s(_vm.$t(\"Components.ToDos.ModalDeleteToDo.Text_Delete\"))\n                ),\n              ]),\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.ToDos.ModalDeleteToDo.Text_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 \"./ModalDeleteToDo.vue?vue&type=template&id=1c1ee3dc\"\nimport script from \"./ModalDeleteToDo.vue?vue&type=script&lang=js\"\nexport * from \"./ModalDeleteToDo.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('1c1ee3dc')) {\n      api.createRecord('1c1ee3dc', component.options)\n    } else {\n      api.reload('1c1ee3dc', component.options)\n    }\n    module.hot.accept(\"./ModalDeleteToDo.vue?vue&type=template&id=1c1ee3dc\", function () {\n      api.rerender('1c1ee3dc', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/ToDos/ModalDeleteToDo.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!./ModalDeleteToDo.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!./ModalDeleteToDo.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!./ModalDeleteToDo.vue?vue&type=template&id=1c1ee3dc\"","import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n"],"sourceRoot":""}