1import{j as e}from"./vendor-react-C9yDzYQD.js";import{A as a}from"./AnimatedLogo-BHNlQQ7J.js";import{A as r,a as o,b as s}from"./avatar-BhqY-G3f.js";import{B as l}from"./BoardPreviewAvatar-6XMyttho.js";import{f as d}from"./displayText-DVC6GTMU.js";import{a as i}from"./runtime-utils-GN4cODRt.js";import{a as t}from"./useAuth-Dz3EPsxs.js";import{u as n}from"./usePerfBudget-B6X6q34-.js";import{ExploreBoardCard as m}from"./ExploreBoardCard-BxGF04S-.js";import{L as c}from"./vendor-router-X7RJKav4.js";import{F as x}from"./folder-open-Bn7HwDJq.js";function p({item:a,animationDelay:n=0,lowEnd:m}){var p;const{user:f}=t(),u=d(a.owner_username),h=String(a.owner_username||u).trim()||u,v=`/u/${encodeURIComponent(h)}/${String(a.slug||"").split("/").map(encodeURIComponent).join("/")}`,w=(null==f?void 0:f.id)&&a.owner_id===f.id&&a.folder_private_path?a.folder_private_path:v,j=a.folder_board_count??a.memory_count,b=Boolean(a.folder_preview_memory_id||a.folder_preview_board);return e.jsxs(c,{to:w,"aria-label":`${a.name}. Folder curated by @${u}.`,className:"group block w-full min-w-0 max-w-full animate-in fade-in slide-in-from-bottom-2",style:{animationDelay:`${n}ms`},children:[e.jsx("div",{className:i("relative h-44 w-full max-w-full overflow-hidden rounded-[1.5rem] bg-card transition-all duration-300 group-hover:shadow-float",b?"border-0 shadow-none":"border border-primary/50 group-hover:border-primary group-hover:bg-muted/20"),style:m?void 0:{WebkitMaskImage:"-webkit-radial-gradient(white, black)",isolation:"isolate"},children:a.folder_preview_memory_id?e.jsx(l,{boardId:`curated-folder-preview-${a.folder_id}-${a.folder_preview_memory_id}`,previewIds:[a.folder_preview_memory_id],maxItems:1,className:"absolute inset-0",videoPlayMode:"never",fallbackIcon:e.jsx(x,{className:"h-10 w-10 text-primary"})}):a.folder_preview_board?e.jsx(l,{boardId:a.folder_preview_board.id,previewMedia:a.folder_preview_board.preview_media,className:"absolute inset-0",videoPlayMode:"never",fallbackIcon:e.jsx(x,{className:"h-10 w-10 text-primary"})}):e.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-center",children:e.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-background/75 text-primary shadow-sm backdrop-blur-md",children:e.jsx(x,{className:"h-8 w-8"})})})}),e.jsxs("div",{className:"mt-3 px-1",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[e.jsxs(r,{className:"h-5 w-5",children:[e.jsx(o,{src:a.owner_avatar||void 0}),e.jsx(s,{className:"text-[10px]",children:(null==(p=u[0])?void 0:p.toUpperCase())||"?"})]}),e.jsxs("span",{className:"truncate text-xs capitalize text-muted-foreground",children:["@",u]})]}),e.jsx("h3",{className:"truncate text-base font-bold text-foreground transition-colors group-hover:text-primary",children:a.name}),e.jsxs("p",{className:"mt-0.5 text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:[j," ",1===j?"Board":"Boards"]})]})]})}function f({boards:r,isLoading:o,onFollow:s,onUnfollow:l}){const{lowEnd:d}=n();return o&&0===r.length?e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-6 w-6 overflow-hidden",children:e.jsx(a,{alt:"Echo logo",className:"h-full w-full object-cover"})}),e.jsx("h2",{className:"text-lg font-bold",children:"Curated by Echo"})]}),e.jsx("div",{className:"scrollbar-hide -mx-4 flex gap-4 overflow-x-auto px-4 pb-2 md:-mx-6 md:px-6",children:[...Array(4)].map((a,r)=>e.jsxs("div",{className:"w-[200px] flex-none animate-pulse",style:{animationDelay:100*r+"ms"},children:[e.jsx("div",{className:"h-44 rounded-[1.5rem] bg-muted"}),e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsx("div",{className:"h-3 w-20 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-32 rounded bg-muted"}),e.jsx("div",{className:"h-3 w-24 rounded bg-muted"})]})]},r))})]}):0===r.length?null:e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-8 w-8 overflow-hidden",children:e.jsx(a,{alt:"Echo logo",className:"h-full w-full object-cover"})}),e.jsx("h2",{className:"text-lg font-bold",children:"Curated by Echo"})]}),e.jsx("div",{className:"scrollbar-hide -mx-4 flex gap-4 overflow-x-auto px-4 pb-2 md:-mx-6 md:px-6",children:r.map((a,r)=>
1e.jsx("div",{className:i("flex-none","folder"===a.curated_kind?"w-[416px]":"w-[200px]"),children:"folder"===a.curated_kind?e.jsx(p,{item:a,animationDelay:50*r,lowEnd:d}):e.jsx(m,{board:a,onFollow:s,onUnfollow:l,animationDelay:50*r})},a.id))})]})}export{f as CuratedByEchoSection};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.