(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{346:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.bot?n("main",{staticClass:"main-container main-container--bot-profile"},[t.bot.nickname&&t.nicknames?n("h2",{staticClass:"title"},[t._v("\n\t\t"+t._s(t.$t("bot-delete",{name:t.bot.nickname}))+"\n\t")]):n("h2",{staticClass:"title"},[t._v("\n\t\t"+t._s(t.$t("bot-delete",{name:t.bot.name}))+"\n\t")]),t._v(" "),n("div",{staticClass:"form-item"},[n("div",{staticClass:"form-item__buttons form-item__buttons--center"},[n("button",{staticClass:"button button--cancel",on:{click:t.onDelete}},[t.deleting?n("font-awesome-icon",{attrs:{icon:"spinner",spin:""}}):n("span",[t._v(t._s(t.$t("delete")))])],1),t._v(" "),n("button",{staticClass:"button button--confirm",on:{click:function(e){return t.$parent.back()}}},[t._v("\n\t\t\t\t"+t._s(t.$t("cancel"))+"\n\t\t\t")])])])]):t._e()};o._withStripped=!0;var a=n(3),i=n(14);function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r={name:"bot-delete",data:()=>({deleting:!1}),computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){s(t,e,n[e])})}return t}({},Object(a.c)({nicknames:"settings/nicknames"}),{bot(){return this.$store.getters["bots/bot"](this.$route.params.bot)}}),created(){this.bot||this.$router.replace({name:"bots"})},methods:{async onDelete(){this.deleting=!0;try{await this.$http.del("bot/".concat(this.bot.name)),await Object(i.a)(1e3),await this.$store.dispatch("bots/updateBot",{name:this.bot.name}),this.$router.push({name:"bots"})}finally{this.deleting=!1}}}},c=n(1),l=Object(c.a)(r,o,[],!1,null,null,null);l.options.__file="src/views/modals/BotDelete.vue";e.default=l.exports}}]);