{"version":3,"sources":["webpack:///./src/pages/blog/posts/Delete.vue?72f4","webpack:///./src/pages/blog/posts/Delete.vue","webpack:///./src/pages/blog/posts/Delete.vue?092f","webpack:///./src/pages/blog/posts/Delete.vue?cb8b"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","active","staticClass","on","$event","preventDefault","save","_v","blogPost","title","toLowerCase","substr","isLoading","model","value","callback","$$v","confirmation","expression","name","$t","validated","_e","staticRenderFns","component","Base","extend","data","undefined","computed","mounted","getBlogPost","methods","get","$route","params","id","then","delete","$router","push","$emit"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,UAAU,CAACF,EAAG,UAAU,CAACE,MAAM,CAAC,OAASN,EAAIO,OAAO,cAAa,IAAQ,CAACH,EAAG,OAAO,CAACI,YAAY,aAAaC,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBX,EAAIY,UAAU,CAACR,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,IAAI,CAACI,YAAY,oBAAoB,CAACR,EAAIa,GAAG,uBAAwBb,EAAY,SAAE,CAACI,EAAG,UAAU,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQ,gBAAiBN,EAAIc,SAASC,MAAMC,cAAcC,OAAO,EAAE,GAAG,iBAAkB,CAACb,EAAG,UAAU,CAACE,MAAM,CAAC,SAAWN,EAAIkB,WAAWC,MAAM,CAACC,MAAOpB,EAAgB,aAAEqB,SAAS,SAAUC,GAAMtB,EAAIuB,aAAaD,GAAKE,WAAW,mBAAmB,IAAI,GAAGpB,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,IAAM,WAAW,GAAK,CAACmB,KAAM,mBAAmB,MAAQzB,EAAI0B,GAAG,SAAS,YAAY,WAAWtB,EAAG,WAAW,CAACE,MAAM,CAAC,SAAWN,EAAIkB,YAAelB,EAAI2B,UAAU,MAAQ,SAAS,KAAO,YAAY,cAAc,aAAa,IAAI3B,EAAI4B,MAAM,MAAM,IACxiCC,EAAkB,G,YCgDhBC,EAAYC,EAAA,KAAKC,OAAO,CAC1BC,KAD0B,WAEtB,MAAO,CACH1B,QAAQ,EACRgB,aAAc,GACdT,cAAUoB,IAGlBC,SAAU,CACNR,UADM,WAEF,OAAO1B,KAAKsB,eAAiBtB,KAAKa,SAASC,MAAMC,cAAcC,OAAO,EAAG,KAGjFmB,QAb0B,WActBnC,KAAKM,QAAS,EACdN,KAAKoC,eAETC,QAAS,CACLD,YADK,WACM,WACPpC,KAAKsC,IAAL,qBAA0CtC,KAAKuC,OAAOC,OAAOC,KAAMC,MAAK,YAAa,IAAVV,EAAU,EAAVA,KACvE,EAAKnB,SAAWmB,EAAKA,SAG7BrB,KANK,WAMD,WACIX,KAAK0B,WACL1B,KAAK2C,OAAL,qBAA0B3C,KAAKa,SAAS4B,KAAMC,MAAK,WAC/C,EAAKE,QAAQC,KAAK,CAAErB,KAAM,oBAC1B,EAAKsB,MAAM,iBAOhB,ICnFsZ,I,YCOja,EAAY,eACd,EACAhD,EACA8B,GACA,EACA,KACA,KACA,MAIa,e","file":"js/chunk-2d0c0352.31184212.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('portal',{attrs:{\"to\":\"modal\"}},[_c('b-modal',{attrs:{\"active\":_vm.active,\"can-cancel\":false}},[_c('form',{staticClass:\"modal-card\",on:{\"submit\":function($event){$event.preventDefault();return _vm.save()}}},[_c('header',{staticClass:\"modal-card-head\"},[_c('p',{staticClass:\"modal-card-title\"},[_vm._v(\" Delete a post \")])]),(_vm.blogPost)?[_c('section',{staticClass:\"modal-card-body\"},[_c('b-field',{attrs:{\"label\":'Please type \\''+_vm.blogPost.title.toLowerCase().substr(0,5)+'\\' to confirm'}},[_c('b-input',{attrs:{\"disabled\":_vm.isLoading},model:{value:(_vm.confirmation),callback:function ($$v) {_vm.confirmation=$$v},expression:\"confirmation\"}})],1)],1),_c('footer',{staticClass:\"modal-card-foot\"},[_c('sp-link',{attrs:{\"tag\":\"b-button\",\"to\":{name: 'blog.posts.list'},\"label\":_vm.$t('close'),\"icon-left\":\"times\"}}),_c('b-button',{attrs:{\"disabled\":_vm.isLoading || ! _vm.validated,\"label\":\"Delete\",\"type\":\"is-danger\",\"native-type\":\"submit\"}})],1)]:_vm._e()],2)])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Base from '@/mixins/Base.vue';\nimport { IBlogPost, IBlogPostResponse } from '@/interfaces/blogpost';\n\nconst component = Base.extend({\n data() {\n return {\n active: false,\n confirmation: '',\n blogPost: undefined as any | IBlogPost,\n };\n },\n computed: {\n validated() : boolean {\n return this.confirmation === this.blogPost.title.toLowerCase().substr(0, 5);\n },\n },\n mounted() {\n this.active = true;\n this.getBlogPost();\n },\n methods: {\n getBlogPost(): void {\n this.get(`blog/posts/${this.$route.params.id}`).then(({ data }) => {\n this.blogPost = data.data;\n });\n },\n save(): void {\n if (this.validated) {\n this.delete(`blog/posts/${this.blogPost.id}`).then(() => {\n this.$router.push({ name: 'blog.posts.list' });\n this.$emit('reload');\n });\n }\n },\n },\n});\n\nexport default component;\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=048f0b34&\"\nimport script from \"./Delete.vue?vue&type=script&lang=ts&\"\nexport * from \"./Delete.vue?vue&type=script&lang=ts&\"\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":""}