import{X as _}from"./MkWidgets-D7JOo9SI.js";import{v as s,b as a,_ as b}from"./app-QjDgb7aF.js";import{b as x,c as y,j as n,p as l,k as B,u as o,q as u,J as r,D as g,a as p}from"./vue-Cm77DuTi.js";import"./v4-Dnyct6Ft.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const E=["aria-label"],C=x({__name:"universal.widgets",emits:["mounted"],setup(N,{emit:m}){const f=m,d=p(!1),c=p();y(()=>{f("mounted",c.value)});function v(e){s.set("widgets",[{...e,place:null},...s.state.widgets])}function w(e){s.set("widgets",s.state.widgets.filter(t=>t.id!==e.id))}function W({id:e,data:t}){s.set("widgets",s.state.widgets.map(i=>i.id===e?{...i,data:t}:i))}function k(e){s.set("widgets",e)}return(e,t)=>(n(),l("aside",{class:"widgets","aria-label":o(a).ts._deck._columns.widgets},[B(_,{edit:d.value,widgets:o(s).reactiveState.widgets.value,onAddWidget:v,onRemoveWidget:w,onUpdateWidget:W,onUpdateWidgets:k,onExit:t[0]||(t[0]=i=>d.value=!1)},null,8,["edit","widgets"]),d.value?(n(),l("button",{key:0,class:"_textButton",style:{"font-size":"0.9em"},onClick:t[1]||(t[1]=i=>d.value=!1)},[t[3]||(t[3]=u("i",{class:"ph-check ph-bold ph-lg"},null,-1)),r(" "+g(o(a).ts.editWidgetsExit),1)])):(n(),l("button",{key:1,class:"_textButton mk-widget-edit",style:{"font-size":"0.9em"},onClick:t[2]||(t[2]=i=>d.value=!0)},[t[4]||(t[4]=u("i",{class:"ph-pencil ph-bold ph-lg"},null,-1)),r(" "+g(o(a).ts.editWidgets),1)]))],8,E))}}),U=b(C,[["__scopeId","data-v-d2261864"]]);export{U as default};
//# sourceMappingURL=universal.widgets-Dvf4Xddb.js.map
