var B=Object.defineProperty,E=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var f=(e,t,s)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,u=(e,t)=>{for(var s in t||(t={}))z.call(t,s)&&f(e,s,t[s]);if(m)for(var s of m(t))C.call(t,s)&&f(e,s,t[s]);return e},p=(e,t)=>E(e,I(t));import{X as N}from"./MkWidgets-0l3lvlZF.js";import{a as o,i as r,n as V}from"./app-JmgyQoR0.js";import{b as $,a as _,e as M,h as c,t as g,l as U,z as l,K as v,E as w,I as X,J as A,u as W}from"./vue-y3KLWBaS.js";import"./v4-U7xWZqn4.js";const b=e=>(X("data-v-63f73b72"),e=e(),A(),e),D=["aria-label"],J=b(()=>W("i",{class:"ph-check ph-bold ph-lg"},null,-1)),K=b(()=>W("i",{class:"ph-pencil ph-bold ph-lg"},null,-1)),R=$({__name:"universal.widgets",emits:["mounted"],setup(e,{emit:t}){const s=t,n=_(!1),k=_();M(()=>{s("mounted",k.value)});function h(d){o.set("widgets",[p(u({},d),{place:null}),...o.state.widgets])}function x(d){o.set("widgets",o.state.widgets.filter(i=>i.id!==d.id))}function S({id:d,data:i}){o.set("widgets",o.state.widgets.map(a=>a.id===d?p(u({},a),{data:i}):a))}function y(d){o.set("widgets",d)}return(d,i)=>(c(),g("aside",{class:"widgets","aria-label":l(r).ts._deck._columns.widgets},[U(N,{edit:n.value,widgets:l(o).reactiveState.widgets.value,onAddWidget:h,onRemoveWidget:x,onUpdateWidget:S,onUpdateWidgets:y,onExit:i[0]||(i[0]=a=>n.value=!1)},null,8,["edit","widgets"]),n.value?(c(),g("button",{key:0,class:"_textButton",style:{"font-size":"0.9em"},onClick:i[1]||(i[1]=a=>n.value=!1)},[J,v(" "+w(l(r).ts.editWidgetsExit),1)])):(c(),g("button",{key:1,class:"_textButton mk-widget-edit",style:{"font-size":"0.9em"},onClick:i[2]||(i[2]=a=>n.value=!0)},[K,v(" "+w(l(r).ts.editWidgets),1)]))],8,D))}}),H=V(R,[["__scopeId","data-v-63f73b72"]]);export{H as default};
