{"version":3,"sources":["webpack:///src/components/Articles/ModalDeleteArticleSource.vue","webpack:///./src/components/Articles/ModalDeleteArticleSource.vue","webpack:///./src/components/Articles/ModalDeleteArticleSource.vue?e697","webpack:///./src/components/Articles/ModalDeleteArticleSource.vue?a6c3","webpack:///./src/components/Articles/ModalDeleteArticleSource.vue?2469"],"names":["name","components","Modal","Checkbox","props","articleId","type","Number","required","source","Object","showModal","Boolean","default","onClickCancel","Function","data","isDeleteConfirmed","isDeleting","isDeletingSuccess","isDeletingError","computed","_objectSpread","mapState","created","methods","mapMutations","deleteLink","_this","_asyncToGenerator","_regenerator","m","_callee","t","_t","w","_context","p","n","a","articleProvider","deleteArticleLink","Id","$emit","setTimeout","clearTimeout","v","render","_vm","_c","_self","attrs","modalTitle","$t","confirmButtonCssClass","buttonLabelConfirm","successMessage","errorMessage","isSaving","isSavingSuccess","isSavingError","hideFooterButtons","disableSaveButton","onClickSave","scopedSlots","_u","key","fn","staticClass","_v","_s","Text","label","on","click","$event","indexOf","_k","keyCode","ctrlKey","button","shiftKey","altKey","metaKey","apply","arguments","model","value","callback","$$v","expression","proxy","staticRenderFns","_withStripped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyCA;AACA;AACA;AACA;AAEe;EACfA,IAAA;EACAC,UAAA;IACAC,KAAA,EAAAA,2EAAA;IACAC,QAAA,EAAAA;EACA;EAEAC,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,MAAA;MACAC,QAAA;IACA;IACAC,MAAA;MACAH,IAAA,EAAAI,MAAA;MACAF,QAAA;IACA;IAEAG,SAAA;MACAL,IAAA,EAAAM,OAAA;MACAC,OAAA;IACA;IAEAC,aAAA;MACAR,IAAA,EAAAS,QAAA;MACAP,QAAA;IACA;EACA;EAEAQ,IAAA,WAAAA,KAAA;IACA;MACAC,iBAAA;MACAC,UAAA;MACAC,iBAAA;MACAC,eAAA;IACA;EACA;EAEAC,QAAA,EAAAC,iIAAA,KACAC,6DAAA,8BACA;EAEAC,O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AAAsG;AAC3B;AACL;;;AAGtE;AAC6F;AAC7F,gBAAgB,mHAAU;AAC1B,EAAE,qGAAM;AACR,EAAE,0GAAM;AACR,EAAE,mHAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAAgT,CAAgB,0VAAG,EAAC,C;;;;;;;;;;;;;ACApU;AAAA;AAAA;AAAA;AAAA","file":"js/338.js?id=ed52cb5a00e97965b52b","sourcesContent":["<template>\n  <Modal\n    :modalTitle=\"$t('Components.Article.ArticleDetail.ModalDeleteArticleSource.Modal_Title')\"\n    confirmButtonCssClass=\"is-danger\"\n    :buttonLabelConfirm=\"$t('Form.Control.Delete')\"\n    :successMessage=\"$t('Components.Article.ArticleDetail.ModalDeleteArticleSource.Message_succesDeleting')\"\n    :errorMessage=\"$t('Components.Article.ArticleDetail.ModalDeleteArticleSource.Message_ErrorDeleting')\"\n    :isSaving=\"isDeleting\"\n    :isSavingSuccess=\"isDeletingSuccess\"\n    :isSavingError=\"isDeletingError\"\n    :hideFooterButtons=\"isDeletingSuccess\"\n    :disableSaveButton=\"!isDeleteConfirmed\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"deleteLink\"\n    :showModal=\"showModal\"\n  >\n    <template v-slot:content>\n      <div class=\"delete-content-container\">\n        <div class=\"mb-4 is-size-5 has-text-centered\">\n          {{\n          $t('Components.Article.ArticleDetail.ModalDeleteArticleSource.Message_AreYouSure', {\n            name: source.Text,\n          })\n        }}\n        </div>\n\n        <div class=\"has-text-centered\">\n          <Checkbox\n            v-model=\"isDeleteConfirmed\"\n            :label=\"$t('General.Text_YesSure')\"\n            @click.ctrl.left.exact=\"deleteLink\"\n            class=\"is-inline-block\"\n          />\n        </div>\n\n      </div>\n    </template>\n  </Modal>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex'\nimport Modal from '@/components/UI/Components/Modal.vue'\nimport Checkbox from '@/components/UI/Form/Checkbox.vue'\nimport articleProvider from '../../providers/article'\n\nexport default {\n  name: 'ModalDeleteArticleSource',\n  components: {\n    Modal,\n    Checkbox\n  },\n\n  props: {\n    articleId: {\n      type: Number,\n      required: true\n    },\n    source: {\n      type: Object,\n      required: true,\n    },\n\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n\n    onClickCancel: {\n      type: Function,\n      required: true,\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('articleStore', ['article']),\n  },\n\n  created() { },\n\n  methods: {\n    ...mapMutations('articleStore', ['setArticle']),\n\n    async deleteLink() {\n      if (this.isDeleting) { return }\n      this.isDeleting = true\n\n      try {\n        await articleProvider.methods.deleteArticleLink(this.articleId, this.source.Id)\n        this.isDeletingSuccess = true\n        this.$emit('updated', this.source.Id)\n        let t = setTimeout(() => {\n          this.onClickCancel()\n          clearTimeout(t)\n        }, 1500);\n      } catch {\n        this.isDeleting = false\n        this.isDeletingError = true\n      }\n    },\n  },\n}\n</script>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\"Modal\", {\n    attrs: {\n      modalTitle: _vm.$t(\n        \"Components.Article.ArticleDetail.ModalDeleteArticleSource.Modal_Title\"\n      ),\n      confirmButtonCssClass: \"is-danger\",\n      buttonLabelConfirm: _vm.$t(\"Form.Control.Delete\"),\n      successMessage: _vm.$t(\n        \"Components.Article.ArticleDetail.ModalDeleteArticleSource.Message_succesDeleting\"\n      ),\n      errorMessage: _vm.$t(\n        \"Components.Article.ArticleDetail.ModalDeleteArticleSource.Message_ErrorDeleting\"\n      ),\n      isSaving: _vm.isDeleting,\n      isSavingSuccess: _vm.isDeletingSuccess,\n      isSavingError: _vm.isDeletingError,\n      hideFooterButtons: _vm.isDeletingSuccess,\n      disableSaveButton: !_vm.isDeleteConfirmed,\n      onClickCancel: _vm.onClickCancel,\n      onClickSave: _vm.deleteLink,\n      showModal: _vm.showModal,\n    },\n    scopedSlots: _vm._u([\n      {\n        key: \"content\",\n        fn: function () {\n          return [\n            _c(\"div\", { staticClass: \"delete-content-container\" }, [\n              _c(\"div\", { staticClass: \"mb-4 is-size-5 has-text-centered\" }, [\n                _vm._v(\n                  \" \" +\n                    _vm._s(\n                      _vm.$t(\n                        \"Components.Article.ArticleDetail.ModalDeleteArticleSource.Message_AreYouSure\",\n                        { name: _vm.source.Text }\n                      )\n                    ) +\n                    \" \"\n                ),\n              ]),\n              _c(\n                \"div\",\n                { staticClass: \"has-text-centered\" },\n                [\n                  _c(\"Checkbox\", {\n                    staticClass: \"is-inline-block\",\n                    attrs: { label: _vm.$t(\"General.Text_YesSure\") },\n                    on: {\n                      click: function ($event) {\n                        if (\n                          !$event.type.indexOf(\"key\") &&\n                          _vm._k($event.keyCode, \"left\", 37, $event.key, [\n                            \"Left\",\n                            \"ArrowLeft\",\n                          ])\n                        )\n                          return null\n                        if (!$event.ctrlKey) return null\n                        if (\"button\" in $event && $event.button !== 0)\n                          return null\n                        if ($event.shiftKey || $event.altKey || $event.metaKey)\n                          return null\n                        return _vm.deleteLink.apply(null, arguments)\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        },\n        proxy: true,\n      },\n    ]),\n  })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ModalDeleteArticleSource.vue?vue&type=template&id=2f6b09ea\"\nimport script from \"./ModalDeleteArticleSource.vue?vue&type=script&lang=js\"\nexport * from \"./ModalDeleteArticleSource.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('2f6b09ea')) {\n      api.createRecord('2f6b09ea', component.options)\n    } else {\n      api.reload('2f6b09ea', component.options)\n    }\n    module.hot.accept(\"./ModalDeleteArticleSource.vue?vue&type=template&id=2f6b09ea\", function () {\n      api.rerender('2f6b09ea', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Articles/ModalDeleteArticleSource.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!./ModalDeleteArticleSource.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!./ModalDeleteArticleSource.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!./ModalDeleteArticleSource.vue?vue&type=template&id=2f6b09ea\""],"sourceRoot":""}