(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{466:function(t,e,n){"use strict";n.r(e);var r=n(3),o=(n(17),n(30),{name:"EventAdmin",props:{event:{type:Object,default:()=>({})}},methods:{remove(){var t=arguments,e=this;return Object(r.a)((function*(){var n=t.length>0&&void 0!==t[0]&&t[0];if(yield e.$root.$confirm("event.remove_".concat(n?"recurrent_":"","confirmation"))){var r=n?e.event.parentId:e.event.id;yield e.$axios.delete("/event/".concat(r)),e.$router.replace("/")}}))()},toggle(){var t=arguments,e=this;return Object(r.a)((function*(){var n=t.length>0&&void 0!==t[0]&&t[0],r=n?e.event.parentId:e.event.id,o=n?e.event.parent.is_visible:e.event.is_visible,c=o?"unconfirm":"confirm";try{yield e.$axios.$put("/event/".concat(c,"/").concat(r)),n?e.event.parent.is_visible=!o:e.event.is_visible=!o}catch(t){console.error(t)}}))()}}}),c=o,v=n(6),component=Object(v.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.event.is_visible?n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.toggle(!1)}}},[t._v(t._s(t.$t("common."+(t.event.parentId?"skip":"hide"))))]):n("v-btn",{attrs:{text:"",color:"success"},on:{click:function(e){return t.toggle(!1)}}},[n("v-icon",{attrs:{color:"yellow"}},[t._v("mdi-alert")]),t._v(" "+t._s(t.$t("common.confirm")))],1),n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.$router.push("/add/"+t.event.id)}}},[t._v(t._s(t.$t("common.edit")))]),t.event.parentId?t._e():n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.remove(!1)}}},[t._v(t._s(t.$t("common.remove")))]),t.event.parentId?[n("v-divider"),n("span",{staticClass:"mr-1"},[n("v-icon",[t._v("mdi-repeat")]),t._v(" "+t._s(t.$t("event.edit_recurrent")))],1),t.event.parent.is_visible?n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.toggle(!0)}}},[t._v(t._s(t.$t("common.pause")))]):n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.toggle(!0)}}},[t._v(t._s(t.$t("common.start")))]),n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.$router.push("/add/"+t.event.parentId)}}},[t._v(t._s(t.$t("common.edit")))]),n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.remove(!0)}}},[t._v(t._s(t.$t("common.remove")))])]:t._e()],2)}),[],!1,null,null,null);e.default=component.exports}}]);