{"version":3,"sources":["webpack:///./src/components/Comments/Reply.vue","webpack:///src/components/Comments/Reply.vue","webpack:///./src/components/Comments/Reply.vue?b116","webpack:///./src/components/Comments/Reply.vue?ad00"],"names":["render","_vm","this","_c","_self","attrs","$t","isSaving","onClickCancel","replyToComment","showModal","isSavingError","isSavingSuccess","on","scopedSlots","_u","key","fn","_e","staticClass","directives","name","rawName","value","replyInput","expression","ref","domProps","$event","target","composing","_v","_s","proxy","slot","staticRenderFns","ErrorAnimation","SuccessAnimation","components","props","type","Boolean","default","Function","required","commentId","Number","data","mounted","$refs","focus","methods","_this","commentProvider","then","response","$emit","setTimeout","catch","e","finally","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAAG,4CAA4C,SAAWL,EAAIM,SAAS,cAAgBN,EAAIO,cAAc,YAAcP,EAAIQ,eAAe,UAAYR,EAAIS,UAAU,kBAAoBT,EAAIU,eAAiBV,EAAIW,gBAAgB,mBAAqBX,EAAIK,GAAG,0CAA0CO,GAAG,CAAC,WAAaZ,EAAIO,eAAeM,YAAYb,EAAIc,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAAGhB,EAAIU,eAAkBV,EAAIW,gBAA6ZX,EAAIiB,KAAhZf,EAAG,UAAU,CAACgB,YAAY,WAAW,CAAChB,EAAG,MAAM,CAACgB,YAAY,aAAa,CAAChB,EAAG,WAAW,CAACiB,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOtB,EAAIuB,WAAYC,WAAW,eAAeC,IAAI,aAAaP,YAAY,WAAWd,MAAM,CAAC,KAAO,KAAK,KAAO,MAAMsB,SAAS,CAAC,MAAS1B,EAAIuB,YAAaX,GAAG,CAAC,MAAQ,SAASe,GAAWA,EAAOC,OAAOC,YAAiB7B,EAAIuB,WAAWI,EAAO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A,KACA,KACA,MAIa,aAAA0B,E","file":"js/chunk-2d209237.js?id=c033adeeed5cc843fdca","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":_vm.$t('Components.Comments.Reply.Subtitle_Reply'),\"isSaving\":_vm.isSaving,\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.replyToComment,\"showModal\":_vm.showModal,\"hideFooterButtons\":_vm.isSavingError || _vm.isSavingSuccess,\"buttonLabelConfirm\":_vm.$t('Components.Comments.Reply.Button_Send')},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [(!_vm.isSavingError && !_vm.isSavingSuccess)?_c('section',{staticClass:\"section\"},[_c('div',{staticClass:\"container\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.replyInput),expression:\"replyInput\"}],ref:\"replyInput\",staticClass:\"textarea\",attrs:{\"cols\":\"30\",\"rows\":\"10\"},domProps:{\"value\":(_vm.replyInput)},on:{\"input\":function($event){if($event.target.composing)return;_vm.replyInput=$event.target.value}}})])]):_vm._e(),(_vm.isSavingSuccess)?_c('section',{staticClass:\"section\"},[_c('div',{staticClass:\"container has-text-centered\"},[_c('success-animation'),_c('div',{staticClass:\"title\"},[_vm._v(\" \"+_vm._s(_vm.$t('Components.Comments.Reply.Text_Success'))+\" \")])],1)]):_vm._e(),(_vm.isSavingError)?_c('section',{staticClass:\"section\"},[_c('div',{staticClass:\"container has-text-centered\"},[_c('error-animation'),_c('div',{staticClass:\"title\"},[_vm._v(\"Oops something went wrong\")])],1)]):_vm._e()]},proxy:true}])},[_c('template',{slot:\"modalTitle\"})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    :modalTitle=\"$t('Components.Comments.Reply.Subtitle_Reply')\"\n    :isSaving=\"isSaving\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"replyToComment\"\n    :showModal=\"showModal\"\n    :hideFooterButtons=\"isSavingError || isSavingSuccess\"\n    :buttonLabelConfirm=\"$t('Components.Comments.Reply.Button_Send')\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\"></template>\n    <template v-slot:content>\n      <section v-if=\"!isSavingError && !isSavingSuccess\" class=\"section\">\n        <div class=\"container\">\n          <textarea\n            v-model=\"replyInput\"\n            class=\"textarea\"\n            cols=\"30\"\n            rows=\"10\"\n            ref=\"replyInput\"\n          ></textarea>\n        </div>\n      </section>\n\n      <section v-if=\"isSavingSuccess\" class=\"section\">\n        <div class=\"container has-text-centered\">\n          <success-animation />\n\n          <div class=\"title\">\n            {{ $t('Components.Comments.Reply.Text_Success') }}\n          </div>\n        </div>\n      </section>\n\n      <section v-if=\"isSavingError\" class=\"section\">\n        <div class=\"container has-text-centered\">\n          <error-animation />\n\n          <div class=\"title\">Oops something went wrong</div>\n        </div>\n      </section>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport commentProvider from '@/providers/comment'\n\nconst ErrorAnimation = () => import('@/components/UI/Components/ErrorAnimation')\nconst SuccessAnimation = () =>\n  import('@/components/UI/Components/SuccessAnimation')\n\nexport default {\n  components: {\n    'error-animation': ErrorAnimation,\n    'success-animation': SuccessAnimation,\n  },\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n    commentId: {\n      type: Number,\n      default: 0,\n    },\n  },\n\n  data() {\n    return {\n      isSavingError: false,\n      isSavingSuccess: false,\n      isSaving: false,\n      replyInput: '',\n    }\n  },\n\n  mounted() {\n    this.$refs.replyInput.focus()\n  },\n\n  methods: {\n    replyToComment() {\n      this.isSaving = true\n\n      commentProvider.methods\n        .replyToComment(this.commentId, this.replyInput)\n        .then((response) => {\n          this.$emit('replySend', this.commentId)\n          this.isSavingSuccess = true\n\n          this.replyInput = ''\n\n          setTimeout(() => {\n            this.onClickCancel()\n          }, 1000)\n        })\n        .catch((e) => {\n          this.isSavingError = true\n        })\n        .finally(() => {\n          this.isSaving = false\n        })\n    },\n  },\n}\n</script>\n\n<style></style>\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!./Reply.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!./Reply.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Reply.vue?vue&type=template&id=eb1c0c9c\"\nimport script from \"./Reply.vue?vue&type=script&lang=js\"\nexport * from \"./Reply.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":""}