(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{517:function(e,t,n){"use strict";n.r(t);var r=n(3),o=(n(26),n(17),n(48),n(37),{name:"EventAdmin",props:{event:{type:Object,default:function(){return{}}}},methods:{remove:function(){var e=arguments,t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>0&&void 0!==e[0]&&e[0],n.next=3,t.$root.$confirm("event.remove_".concat(r?"recurrent_":"","confirmation"));case 3:if(n.sent){n.next=6;break}return n.abrupt("return");case 6:return o=r?t.event.parentId:t.event.id,n.next=9,t.$axios.delete("/event/".concat(o));case 9:t.$router.replace("/");case 10:case"end":return n.stop()}}),n)})))()},toggle:function(){var e=arguments,t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,o,c,v;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>0&&void 0!==e[0]&&e[0],o=r?t.event.parentId:t.event.id,c=r?t.event.parent.is_visible:t.event.is_visible,v=c?"unconfirm":"confirm",n.prev=4,n.next=7,t.$axios.$put("/event/".concat(v,"/").concat(o));case 7:r?t.event.parent.is_visible=!c:t.event.is_visible=!c,n.next=13;break;case 10:n.prev=10,n.t0=n.catch(4),console.error(n.t0);case 13:case"end":return n.stop()}}),n,null,[[4,10]])})))()}}}),c=o,v=n(11),component=Object(v.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.event.is_visible?n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.toggle(!1)}}},[e._v(e._s(e.$t("common."+(e.event.parentId?"skip":"hide"))))]):n("v-btn",{attrs:{text:"",color:"success"},on:{click:function(t){return e.toggle(!1)}}},[n("v-icon",{attrs:{color:"yellow"}},[e._v("mdi-alert")]),e._v(" "+e._s(e.$t("common.confirm")))],1),n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.$router.push("/add/"+e.event.id)}}},[e._v(e._s(e.$t("common.edit")))]),e.event.parentId?e._e():n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.remove(!1)}}},[e._v(e._s(e.$t("common.remove")))]),e.event.parentId?[n("v-divider"),n("span",{staticClass:"mr-1"},[n("v-icon",[e._v("mdi-repeat")]),e._v(" "+e._s(e.$t("event.edit_recurrent")))],1),e.event.parent.is_visible?n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.toggle(!0)}}},[e._v(e._s(e.$t("common.pause")))]):n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.toggle(!0)}}},[e._v(e._s(e.$t("common.start")))]),n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.$router.push("/add/"+e.event.parentId)}}},[e._v(e._s(e.$t("common.edit")))]),n("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.remove(!0)}}},[e._v(e._s(e.$t("common.remove")))])]:e._e()],2)}),[],!1,null,null,null);t.default=component.exports}}]);