import{dasQ,aMasX,uasY,aNasZ,VasT,xas$,qasoo,aaasto,gaso,Casr,Fasd,easi,vasl,atasv,jasg,_asb,blaseo,bmasno,bnasao,boasro,bpasso,bqasio,braslo,bsasco,Masmo}from"./index-e62f5c21.js";consth=g(()=>b(()=>import("./FelModal-44636049.js"),["assets/FelModal-44636049.js","assets/index-e62f5c21.js","assets/index-332ec99e.css","assets/FelModal-780aeea9.css"])),uo=g(()=>b(()=>import("./FelPageHeading-7ee544a9.js"),["assets/FelPageHeading-7ee544a9.js","assets/index-e62f5c21.js","assets/index-332ec99e.css"])),po=g(()=>b(()=>import("./ContainerView-c1591632.js"),["assets/ContainerView-c1591632.js","assets/index-e62f5c21.js","assets/index-332ec99e.css"])),ho=g(()=>b(()=>import("./FelTreeItem-17e761b6.js"),["assets/FelTreeItem-17e761b6.js","assets/index-e62f5c21.js","assets/index-332ec99e.css"])),So=Q({name:"storage-home",setup(n,go){const{treeData:F,tags:s,activeTree:m,newStoreRoom:k,newStorageLocation:x,newStorageSection:A,newStorageContainer:C,setActiveTree:p}=X(),R=Y(),c=Z(),{withClientMutation:u}=mo();c.fetchStorageTree(),T(()=>m.value,(e,a)=>{e&&e.tag===s.storageContainer&&c.fetchStorageContainer(e.uid)}),T(()=>F.value,(e,a)=>{if(!e)return;constS=R?.options?.history?.state;if(S?.sample){constf=JSON.parse(S?.sample)?.storageContainer,y=f?.storageSection,w=y?.storageLocation,B=w?.storeRoom;p({...B,tag:s.storeRoom}),p({...w,tag:s.storageLocation}),p({...y,tag:s.storageSection}),p({...f,tag:s.storageContainer})}});constO=$(()=>m.value?.tag===s.storeRoom?s.storageLocation:m.value?.tag===s.storageLocation?s.storageSection:m.value?.tag===s.storageSection?s.storageContainer:m.value?.tag===s.storageContainer?s.containerView:null),t=oo({roomModalShow:!1,roomFormTitle:"",roomForm:{},roomFormAction:!0,locationModalShow:!1,locationFormTitle:"",locationForm:{},locationFormAction:!0,sectionModalShow:!1,sectionFormTitle:"",sectionForm:{},sectionFormAction:!0,containerModalShow:!1,containerFormTitle:"",containerForm:{},containerFormAction:!0});functionE(){conste={...t.roomForm};u(eo,{payload:e},"createStoreRoom").then(a=>{c.addStoreRoom(a),k(a)})}function_(){conste={name:t.roomForm.name,description:t.roomForm.description};u(no,{uid:t.roomForm.uid,payload:e},"updateStoreRoom").then(a=>c.updateStoreRoom(a))}functionM(e,a){t.roomFormAction=e,t.roomFormTitle=(e?"CREATE":"EDIT")+" A STORE ROOM",t.roomModalShow=!0,e?Object.assign(t.roomForm,{}):Object.assign(t.roomForm,{...a})}functionD(){t.roomFormAction===!0&&E(),t.roomFormAction===!1&&_(),t.roomModalShow=!1}functionL(){conste={...t.locationForm,storeRoomUid:m.value.uid};u(ao,{payload:e},"createStorageLocation").then(a=>{c.addStorageLocation(a),x(a)})}functionN(){conste={name:t.locationForm.name,description:t.locationForm.description};u(ro,{uid:t.locationForm.uid,payload:e},"updateStorageLocation").then(a=>c.updateStorageLocation(a))}functionV(e,a){t.locationFormAction=e,t.locationFormTitle=(e?"CREATE":"EDIT")+" A STORAGE LOCATION",t.locationModalShow=!0,e?Object.assign(t.locationForm,{}):Object.assign(t.locationForm,{...a})}functionI(){t.locationFormAction===!0&&L(),t.locationFormAction===!1&&N(),t.locationModalShow=!1}functionU(){conste={...t.sectionForm,storageLocationUid:m.value.uid};u(so,{payload:e},"createStorageSection").then(a=>{c.addStorageSection(a),A(a)})}functionG(){conste={name:t.sectionForm.name,description:t.sectionForm.description};u(io,{uid:t.sectionForm.uid,payload:e},"updateStorageSection").then(a=>c.updateStorageSection(a))}functionj(e,a){t.sectionFormAction=e,t.sectionFormTitle=(e?"CREATE":"EDIT")+" A STORAGE SECTION",t.sectionModalShow=!0,e?Object.assign(t.sectionForm,{}):Object.assign(t.sectionForm,{...a})}functionW(){t.sectionFormAction===!0&&U(),t.sectionFormAction===!1&&G(),t.sectionModalShow=!1}functionP(){conste={...t.containerForm,storageSectionUid:m.value.uid};u(lo,{payload:e},"createStorageContainer").then(a=>{c.addStorageContainer(a),C(a)})}functionq(){conste={name:t.containerForm.name,description:t.containerForm.description};u(co,{uid:t.containerForm.uid,payload:e},"updateStorageContainer").th