import{aI as f,eu as u,ao as e,at as n,aq as d,bp as F}from"./app-k0jcl5PQ.js";import{C as p}from"./sncKO62z.chunk.js";import{L as j}from"./DVESw1e9.chunk.js";const i="libraries.folderList",g="has:expanded:library:folders";function b(){const l=F();return l.xxl||l.xl||l.lg?6:l.md?4:3}N.defaultProps={showHeading:!0};function N(l){const[c,r]=f.useState(u.get(g)||!1),a=l.expandFolders||c,x=b();function t(){r(!a),u.set(g,!a)}const h=a?l.folders:l.folders.slice(0,x),s=l.folders.length>x&&!l.expandFolders;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[l.showHeading&&e.jsxs(n,{className:`d-inline-flex align-items-center mb-2 px-2 ${s?"":"cursor-default"}`,onClick:t,children:[s&&e.jsx(p,{direction:a?"down":"right"}),e.jsx("h2",{className:"h4 mb-0",children:e.jsx(d,{namespace:i,phrase:"folders",options:{count:l.folders.length}})})]}),!!(!a&&s)&&e.jsx("div",{className:"d-flex justify-content-end justify-self-end px-2",children:e.jsx(n,{onClick:t,className:"text-dark hover-text-underline d-inline-block",children:e.jsx(d,{namespace:i,phrase:"seeAll",options:{count:l.folders.length}})})}),!!(a&&s)&&e.jsx("div",{className:"d-flex justify-content-end justify-self-end px-2",children:e.jsx(n,{onClick:t,className:"text-dark hover-text-underline d-inline-block",children:e.jsx(d,{namespace:i,phrase:"seeLess"})})}),l.extraButtons?l.extraButtons:e.jsx(e.Fragment,{})]}),e.jsx("div",{className:"row mx-1",children:h.map(m=>e.jsx("div",{className:"col-4 col-md-3 col-lg-2 px-1 pb-3",children:e.jsx(j,{folder:m,getAppLink:l.getAppLink,getFolderActions:l.getFolderActions,drag:l.drag,drop:l.drop})},m.id))})]})}const k="_partialFolderHeading_1surw_1",v="_partialFolderThumbnail_1surw_4",_="_partialFolderName_1surw_7",o={partialFolderHeading:k,partialFolderThumbnail:v,partialFolderName:_},L=()=>e.jsxs("div",{className:"col-4 col-md-3 col-lg-2 px-1 pb-3",children:[e.jsx("div",{className:`${o.partialFolderThumbnail} partial-loading-background rounded-top-lg`}),e.jsx("div",{className:`${o.partialFolderName} partial-loading-background border-bottom rounded-bottom-lg font-size-normal mb-0 p-2`,children:" "})]});function H({count:l=3}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${o.partialFolderHeading} h4 mb-2 partial-loading-background`,children:" "}),e.jsx("div",{className:"row mx-n1",children:Array(l).fill(null).map((c,r)=>e.jsx(L,{},r))})]})}export{N as F,H as P};
//# sourceMappingURL=DDqFZOL-.chunk.js.map
