System.register(["../../../common/index-legacy.DRKniymH.js","../../../common/index-legacy.llL3q2Xl.js","../../../common/_plugin-vue_export-helper-legacy.DgAO6S8O.js","../../../common/pinia-legacy.CU8UeoTp.js"],(function(e,l){"use strict";var a,t,i,u,n,s,d,o,c,m,v;return{setters:[e=>{a=e.d,t=e.r,i=e.D,u=e.J,n=e.o,s=e.h,d=e.u,o=e.F,c=e.P},e=>{m=e.u},e=>{v=e._},null],execute:function(){var l=document.createElement("style");l.textContent=".wishlist-app-layout[data-v-7f5f80ab]{padding:20px}\n/*$vite$:1*/",document.head.appendChild(l),e("default",v(a({__name:"AppLayout",setup(e){const{getCollection:l}=m(),a=o("components/Lists.vue"),v=o("components/Items.vue"),r=t(!1),_=t({key:"",user_id:0,id:0,name:"",description:"",status:"",is_default:!1,is_public:!1,url_code:"",items:[],emails:[],user_ids:[],allowed_roles:[],allowed_edit_emails:[]}),p=t(null),y=async(e,l)=>{"new"!==e&&e?.id?(_.value=e,r.value=!0,p.value=l,c("item",e.id)):"new"===e&&(r.value=!0,p.value=null,c("item",""))},f=e=>{"close"===e&&(r.value=!1,_.value={key:"",user_id:0,id:0,name:"",description:"",status:"",is_default:!1,is_public:!1,url_code:"",items:[],emails:[],user_ids:[],allowed_roles:[],allowed_edit_emails:[]},p.value=null,c("item",""),c("add",""))};return i((()=>{"new"===u("add")?(r.value=!0,p.value=null):(async()=>{const e=u("item");if(e){const a=await l(e);_.value=a.data,r.value=!0,p.value=0}})()})),(e,l)=>r.value||null!==p.value?(n(),s(d(v),{key:1,item:_.value,"item-index":p.value,onAction:f},null,8,["item","item-index"])):(n(),s(d(a),{key:0,onLoadItems:y}))}}),[["__scopeId","data-v-7f5f80ab"]]))}}}));
