import{az as c,f7 as p,aI as u,t as n,c1 as d,f8 as m,v as g,T as h,f as E,e as b,ao as l}from"./app-k0jcl5PQ.js";import{u as y}from"./CAxN5LKv.chunk.js";import"./DIAJ896Y.chunk.js";function w(a){const r=c(p.folder(a.folderId));return y(r),u.useEffect(()=>{var s,i;if(!r.hasCompleted||r.hasError)return;const e=(i=(s=r.data)==null?void 0:s.libraries)==null?void 0:i.data;if(!(e!=null&&e.length)){n.throw(new d);return}let t=e.find(f=>{var o;return f.id.toString()===((o=a.libraryId)==null?void 0:o.toString())});if(t||(t=e[0]),t.type!==m.CustomLibrary){n.throw(new d);return}g.trigger({application:b.LIBRARIES,action:E.Libraries.FOLDER,args:[t.id,a.folderId,h.slugify(r.data.name)]},{replace:!0})},[r.hasCompleted]),l.jsx(l.Fragment,{})}export{w as FolderRedirectView};
//# sourceMappingURL=D9wuxJdZ.chunk.js.map
