{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "folder-view",
  "type": "registry:block",
  "title": "Folder View",
  "description": "One folder opened inside a drive, with a folder tree in the sidebar, type filters with counts, a grid of file cards with little drawn previews or a dense table, a bulk bar that rises with a rolling count when you pick a few, and ghost files fanning out of an empty sub-folder.",
  "categories": [
    "screen",
    "Product"
  ],
  "dependencies": [
    "motion",
    "lucide-react"
  ],
  "registryDependencies": [
    "utils",
    "https://coss.com/ui/r/avatar.json",
    "https://coss.com/ui/r/button.json",
    "https://coss.com/ui/r/checkbox.json",
    "https://coss.com/ui/r/tooltip.json"
  ],
  "files": [
    {
      "path": "registry/devl/folder-view.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport { AnimatePresence, LayoutGroup, MotionConfig, motion } from \"motion/react\";\nimport {\n  ArrowLeftIcon,\n  CheckIcon,\n  ChevronRightIcon,\n  ChevronsUpDownIcon,\n  ClockIcon,\n  CloudUploadIcon,\n  DownloadIcon,\n  FileIcon,\n  FilePlusIcon,\n  FileTextIcon,\n  FilmIcon,\n  FolderInputIcon,\n  HouseIcon,\n  ImageIcon,\n  LayoutGridIcon,\n  ListIcon,\n  PlayIcon,\n  PlusIcon,\n  PresentationIcon,\n  Share2Icon,\n  SheetIcon,\n  StarIcon,\n  Trash2Icon,\n  UsersRoundIcon,\n  XIcon,\n} from \"lucide-react\";\nimport { type KeyboardEvent, useEffect, useId, useMemo, useRef, useState } from \"react\";\nimport { Avatar, AvatarFallback } from \"@/components/ui/avatar\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport { Tooltip, TooltipPopup, TooltipTrigger } from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\n\nexport type FolderFileKind = \"doc\" | \"sheet\" | \"image\" | \"slides\" | \"pdf\" | \"video\";\n\nexport interface FolderFile {\n  id: string;\n  name: string;\n  kind: FolderFileKind;\n  size: string;\n  editedBy: string;\n  edited: string;\n  art?: \"logos\" | \"moodboard\" | \"photo\";\n}\n\nexport interface SubFolder {\n  id: string;\n  name: string;\n  files: FolderFile[];\n}\n\nexport interface FolderViewProps {\n  path?: string[];\n  name?: string;\n  files?: FolderFile[];\n  folders?: SubFolder[];\n  members?: string[];\n  me?: string;\n  defaultEmpty?: boolean;\n  defaultView?: \"grid\" | \"list\";\n  workspace?: string;\n  className?: string;\n}\n\nconst spring = { type: \"spring\", stiffness: 420, damping: 36 } as const;\nconst easeOut = [0.23, 1, 0.32, 1] as const;\nconst press = \"transition-[box-shadow,scale] duration-150 ease-out active:scale-[0.97]\";\n\nconst people: Record<string, string> = {\n  AK: \"bg-orange-500/16 text-orange-800 dark:text-orange-300\",\n  JS: \"bg-teal-500/16 text-teal-700 dark:text-teal-300\",\n  MV: \"bg-blue-500/16 text-blue-700 dark:text-blue-300\",\n  LO: \"bg-violet-500/18 text-violet-700 dark:text-violet-300\",\n};\n\nconst defaultFiles: FolderFile[] = [\n  { id: \"f1\", name: \"Brand guidelines v3\", kind: \"doc\", size: \"48 KB\", editedBy: \"AK\", edited: \"12m ago\" },\n  { id: \"f2\", name: \"Logo explorations\", kind: \"image\", size: \"6.2 MB\", editedBy: \"MV\", edited: \"1h ago\", art: \"logos\" },\n  { id: \"f3\", name: \"Colour tokens\", kind: \"sheet\", size: \"212 KB\", editedBy: \"JS\", edited: \"3h ago\" },\n  { id: \"f4\", name: \"Launch keynote\", kind: \"slides\", size: \"18 MB\", editedBy: \"AK\", edited: \"Yesterday\" },\n  { id: \"f5\", name: \"Type specimen\", kind: \"pdf\", size: \"2.4 MB\", editedBy: \"LO\", edited: \"Yesterday\" },\n  { id: \"f6\", name: \"Sizzle reel, cut 2\", kind: \"video\", size: \"412 MB\", editedBy: \"MV\", edited: \"Mon\" },\n  { id: \"f7\", name: \"Moodboard: warm\", kind: \"image\", size: \"9.8 MB\", editedBy: \"LO\", edited: \"Mon\", art: \"moodboard\" },\n  { id: \"f8\", name: \"Copy deck\", kind: \"doc\", size: \"36 KB\", editedBy: \"JS\", edited: \"Oct 18\" },\n  { id: \"f9\", name: \"Asset inventory\", kind: \"sheet\", size: \"88 KB\", editedBy: \"AK\", edited: \"Oct 16\" },\n  { id: \"f10\", name: \"Social templates\", kind: \"slides\", size: \"7.1 MB\", editedBy: \"MV\", edited: \"Oct 12\" },\n];\n\nconst defaultFolders: SubFolder[] = [\n  { id: \"press\", name: \"Press kit\", files: [] },\n  {\n    id: \"archive\",\n    name: \"Archive 2025\",\n    files: [\n      { id: \"a1\", name: \"Old logo lockups\", kind: \"image\", size: \"3.1 MB\", editedBy: \"MV\", edited: \"Mar 4\", art: \"logos\" },\n      { id: \"a2\", name: \"Brand audit\", kind: \"pdf\", size: \"5.6 MB\", editedBy: \"LO\", edited: \"Feb 21\" },\n      { id: \"a3\", name: \"Agency shortlist\", kind: \"sheet\", size: \"64 KB\", editedBy: \"AK\", edited: \"Jan 30\" },\n    ],\n  },\n];\n\nconst uploads: Omit<FolderFile, \"id\" | \"editedBy\" | \"edited\">[] = [\n  { name: \"Press photos\", kind: \"image\", size: \"14 MB\", art: \"photo\" },\n  { name: \"Founder headshots\", kind: \"image\", size: \"8.4 MB\", art: \"photo\" },\n  { name: \"Fact sheet\", kind: \"pdf\", size: \"1.2 MB\" },\n];\n\nconst kindLabel: Record<FolderFileKind, string> = {\n  doc: \"Doc\",\n  sheet: \"Sheet\",\n  image: \"Image\",\n  slides: \"Slides\",\n  pdf: \"PDF\",\n  video: \"Video\",\n};\n\nconst kindDot: Record<FolderFileKind, string> = {\n  doc: \"bg-blue-500\",\n  sheet: \"bg-emerald-500\",\n  image: \"bg-orange-500\",\n  slides: \"bg-violet-500\",\n  pdf: \"bg-red-500\",\n  video: \"bg-pink-500\",\n};\n\nconst kindIcon: Record<FolderFileKind, { icon: typeof FileIcon; tint: string }> = {\n  doc: { icon: FileTextIcon, tint: \"bg-blue-500/12 text-blue-600 dark:text-blue-400\" },\n  sheet: { icon: SheetIcon, tint: \"bg-emerald-500/12 text-emerald-600 dark:text-emerald-400\" },\n  image: { icon: ImageIcon, tint: \"bg-orange-500/12 text-orange-600 dark:text-orange-400\" },\n  slides: { icon: PresentationIcon, tint: \"bg-violet-500/12 text-violet-600 dark:text-violet-400\" },\n  pdf: { icon: FileIcon, tint: \"bg-red-500/12 text-red-600 dark:text-red-400\" },\n  video: { icon: FilmIcon, tint: \"bg-pink-500/12 text-pink-600 dark:text-pink-400\" },\n};\n\nconst places = [\n  { label: \"All files\", icon: HouseIcon },\n  { label: \"Recent\", icon: ClockIcon },\n  { label: \"Shared\", icon: UsersRoundIcon },\n  { label: \"Starred\", icon: StarIcon },\n  { label: \"Trash\", icon: Trash2Icon },\n];\n\nfunction ImageArt({ art = \"photo\" }: { art?: FolderFile[\"art\"] }) {\n  if (art === \"logos\") {\n    return (\n      <div className=\"absolute inset-0 grid grid-cols-2 gap-1.5 p-3\">\n        <span className=\"flex items-center justify-center rounded-lg bg-orange-500\">\n          <span className=\"size-5 rounded-full border-4 border-white\" />\n        </span>\n        <span className=\"flex items-center justify-center rounded-lg bg-card ring-1 ring-border\">\n          <span className=\"size-4 rotate-45 rounded-[5px] border-[3px] border-orange-500\" />\n        </span>\n        <span className=\"flex items-center justify-center rounded-lg bg-neutral-900 dark:bg-neutral-950 dark:ring-1 dark:ring-border\">\n          <span className=\"font-heading font-semibold text-orange-400 text-sm tracking-tight\">orb</span>\n        </span>\n        <span className=\"flex items-center justify-center rounded-lg bg-orange-100 dark:bg-orange-500/20\">\n          <span className=\"flex gap-0.5\">\n            <span className=\"size-2.5 rounded-full bg-orange-600 dark:bg-orange-400\" />\n            <span className=\"size-2.5 rounded-full bg-orange-600/40 dark:bg-orange-400/40\" />\n          </span>\n        </span>\n      </div>\n    );\n  }\n  if (art === \"moodboard\") {\n    return (\n      <div className=\"absolute inset-0 grid grid-cols-3 grid-rows-2 gap-1.5 p-3\">\n        <span className=\"row-span-2 rounded-lg bg-linear-to-b from-amber-300 via-orange-400 to-rose-500\" />\n        <span className=\"rounded-lg bg-linear-to-br from-rose-200 to-orange-300 dark:from-rose-300 dark:to-orange-400\" />\n        <span className=\"flex items-end rounded-lg bg-stone-800 p-1.5 dark:ring-1 dark:ring-border\">\n          <span className=\"font-heading font-semibold text-[11px] text-amber-200 leading-none\">Aa</span>\n        </span>\n        <span className=\"col-span-2 flex overflow-hidden rounded-lg\">\n          {[\"bg-amber-200\", \"bg-orange-400\", \"bg-rose-500\", \"bg-red-800\", \"bg-stone-800\"].map((c) => (\n            <span className={cn(\"flex-1\", c)} key={c} />\n          ))}\n        </span>\n      </div>\n    );\n  }\n  return (\n    <div className=\"absolute inset-0 bg-linear-to-b from-sky-300 to-amber-100 dark:from-sky-800 dark:to-amber-200/60\">\n      <span className=\"absolute top-4 right-6 size-6 rounded-full bg-amber-50/90\" />\n      <span className=\"absolute inset-x-0 bottom-0 h-2/5 bg-emerald-700/80 [clip-path:polygon(0_40%,30%_10%,60%_45%,100%_0,100%_100%,0_100%)]\" />\n    </div>\n  );\n}\n\nfunction Preview({ file }: { file: FolderFile }) {\n  const line = \"h-1 rounded-full bg-muted-foreground/20\";\n  switch (file.kind) {\n    case \"doc\":\n      return (\n        <div className=\"absolute inset-x-5 top-4 bottom-0 flex flex-col gap-1.5 rounded-t-md bg-card px-3.5 pt-3.5 shadow-xs/5 ring-1 ring-border\">\n          <span className=\"h-1.5 w-2/3 rounded-full bg-foreground/56\" />\n          <span className=\"mb-1 h-1 w-1/3 rounded-full bg-muted-foreground/24\" />\n          {[94, 88, 92, 70, 0, 90, 84].map((w, i) =>\n            w ? <span className={line} key={i} style={{ width: `${w}%` }} /> : <span className=\"h-1\" key={i} />,\n          )}\n        </div>\n      );\n    case \"sheet\":\n      return (\n        <div className=\"absolute inset-x-5 top-4 bottom-0 overflow-hidden rounded-t-md bg-card shadow-xs/5 ring-1 ring-border\">\n          <div className=\"grid grid-cols-[1.4rem_repeat(4,1fr)] gap-px bg-border\">\n            {Array.from({ length: 35 }, (_, i) => {\n              const row = Math.floor(i / 5);\n              const col = i % 5;\n              return (\n                <span\n                  className={cn(\n                    \"h-3.5\",\n                    row === 0 || col === 0 ? \"bg-muted\" : \"bg-card\",\n                    col === 3 && row > 0 && \"bg-success/16\",\n                    row === 3 && col === 3 && \"bg-success/40\",\n                  )}\n                  key={i}\n                />\n              );\n            })}\n          </div>\n        </div>\n      );\n    case \"image\":\n      return <ImageArt art={file.art} />;\n    case \"slides\":\n      return (\n        <div className=\"absolute inset-x-4 top-1/2 flex aspect-video -translate-y-1/2 flex-col justify-end gap-1.5 overflow-hidden rounded-md bg-card p-3 shadow-xs/5 ring-1 ring-border\">\n          <span className=\"absolute top-3 right-3 size-6 rounded-full bg-violet-500/48\" />\n          <span className=\"h-2 w-3/5 rounded-full bg-foreground/64\" />\n          <span className=\"h-1 w-2/5 rounded-full bg-muted-foreground/28\" />\n        </div>\n      );\n    case \"pdf\":\n      return (\n        <div className=\"absolute inset-x-6 top-4 bottom-0 flex flex-col gap-1.5 rounded-t-md bg-card px-3.5 pt-4 shadow-xs/5 ring-1 ring-border\">\n          <span className=\"absolute top-2.5 right-2.5 rounded-[3px] bg-red-700 px-1 font-bold text-[8px] text-white dark:bg-red-600\">PDF</span>\n          <span className=\"font-heading font-semibold text-foreground/80 text-lg leading-none\">Aa</span>\n          <span className=\"h-1 w-1/2 rounded-full bg-muted-foreground/24\" />\n          <span className=\"mt-1 grid grid-cols-6 gap-1\">\n            {Array.from({ length: 12 }, (_, i) => (\n              <span className=\"h-2.5 rounded-sm bg-muted\" key={i} />\n            ))}\n          </span>\n        </div>\n      );\n    case \"video\":\n      return (\n        <div className=\"absolute inset-0 overflow-hidden bg-neutral-900\">\n          <span className=\"absolute inset-0 bg-[radial-gradient(ellipse_at_30%_20%,var(--color-indigo-500)_0%,transparent_60%)] opacity-50\" />\n          <span className=\"absolute top-4 right-4 left-1/2 aspect-video rounded-sm bg-linear-to-br from-orange-400 to-rose-500 opacity-90\" />\n          <svg aria-hidden className=\"absolute bottom-0 left-[18%] h-3/5 text-neutral-950\" viewBox=\"0 0 40 60\">\n            <circle cx=\"20\" cy=\"14\" fill=\"currentColor\" r=\"8\" />\n            <path d=\"M4 60c0-18 7-28 16-28s16 10 16 28Z\" fill=\"currentColor\" />\n          </svg>\n          <span className=\"absolute top-1/2 left-1/2 flex size-9 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-white/90 text-neutral-900 shadow-xs/5\">\n            <PlayIcon className=\"ms-0.5 size-4 fill-current\" />\n          </span>\n          <span className=\"absolute inset-x-2 bottom-1.5 h-0.5 rounded-full bg-white/24\">\n            <span className=\"block h-full w-1/3 rounded-full bg-white/80\" />\n          </span>\n          <span className=\"absolute right-2 bottom-3 rounded bg-black/60 px-1 font-mono text-[10px] text-white tabular-nums\">1:42</span>\n        </div>\n      );\n  }\n}\n\nconst rollVariants = {\n  from: (d: number) => ({ y: d * 12, opacity: 0 }),\n  in: { y: 0, opacity: 1 },\n  out: (d: number) => ({ y: d * -12, opacity: 0 }),\n};\n\nfunction RollingCount({ value }: { value: number }) {\n  const prev = useRef(value);\n  const dir = value >= prev.current ? 1 : -1;\n  useEffect(() => {\n    prev.current = value;\n  }, [value]);\n  return (\n    <span className=\"relative inline-flex h-5 min-w-[1ch] justify-end overflow-hidden tabular-nums\">\n      <AnimatePresence custom={dir} initial={false} mode=\"popLayout\">\n        <motion.span\n          animate=\"in\"\n          custom={dir}\n          exit=\"out\"\n          initial=\"from\"\n          variants={rollVariants}\n          key={value}\n          transition={{ duration: 0.2, ease: easeOut }}\n        >\n          {value}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n\nfunction CheckMark({ on }: { on: boolean }) {\n  return (\n    <span\n      aria-hidden\n      className={cn(\n        \"inline-flex size-4.5 shrink-0 items-center justify-center rounded-xs border shadow-xs/5 sm:size-4\",\n        on ? \"border-primary bg-primary text-primary-foreground\" : \"border-input bg-background dark:bg-input/32\",\n      )}\n    >\n      {on && <CheckIcon className=\"size-3.5 sm:size-3\" strokeWidth={3} />}\n    </span>\n  );\n}\n\nfunction FolderGlyph({ className }: { className?: string }) {\n  return (\n    <svg aria-hidden className={cn(\"shrink-0\", className)} fill=\"none\" viewBox=\"0 0 20 16\">\n      <path d=\"M0 2.5A2.5 2.5 0 0 1 2.5 0h4.3a2 2 0 0 1 1.5.7L9.6 2.2h7.9A2.5 2.5 0 0 1 20 4.7v8.8a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 0 13.5Z\" fill=\"currentColor\" opacity=\"0.4\" />\n      <path d=\"M0 6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v7.5a2.5 2.5 0 0 1-2.5 2.5h-15A2.5 2.5 0 0 1 0 13.5Z\" fill=\"currentColor\" />\n    </svg>\n  );\n}\n\nfunction EmptyFolder({ name, onUpload, onNewDoc }: { name: string; onUpload: () => void; onNewDoc: () => void }) {\n  const ghost = [\n    { kind: \"doc\" as const, rotate: -10, x: -64, y: 10 },\n    { kind: \"image\" as const, rotate: 8, x: 64, y: 12 },\n    { kind: \"sheet\" as const, rotate: 0, x: 0, y: 0 },\n  ];\n  return (\n    <motion.div\n      animate={{ opacity: 1, y: 0 }}\n      className=\"flex h-full flex-col items-center justify-center px-6 pb-10 text-center\"\n      exit={{ opacity: 0, y: 6 }}\n      initial={{ opacity: 0, y: 6 }}\n      transition={{ duration: 0.2, ease: easeOut }}\n    >\n      <div className=\"relative mb-8 h-36 w-64\">\n        {ghost.map((g, i) => (\n          <motion.div\n            animate={{ rotate: g.rotate, x: g.x, y: g.y, opacity: 1, scale: 1 }}\n            className=\"absolute top-0 left-1/2 -ms-14 h-32 w-28 overflow-hidden rounded-xl border bg-card shadow-sm/5\"\n            initial={{ rotate: 0, x: 0, y: 12, opacity: 0, scale: 0.95 }}\n            key={g.kind}\n            transition={{ ...spring, delay: 0.05 + 0.04 * i }}\n          >\n            <span className=\"absolute inset-0 bg-muted/60 dark:bg-muted\" />\n            <div className=\"absolute inset-0 opacity-72 grayscale-[0.4]\">\n              <Preview file={{ id: g.kind, name: \"\", kind: g.kind, size: \"\", editedBy: \"\", edited: \"\", art: \"moodboard\" }} />\n            </div>\n          </motion.div>\n        ))}\n        <span className=\"absolute -bottom-3 left-1/2 flex size-9 -translate-x-1/2 items-center justify-center rounded-full border bg-background shadow-xs/5\">\n          <PlusIcon className=\"size-4\" />\n        </span>\n      </div>\n      <h2 className=\"text-balance font-heading font-semibold text-lg\">{name} is empty</h2>\n      <p className=\"mt-1 max-w-xs text-pretty text-muted-foreground\">\n        Drop files anywhere on this page, or start a doc here. Everyone in the folder will see it.\n      </p>\n      <div className=\"mt-5 flex flex-wrap justify-center gap-2\">\n        <Button className={press} onClick={onUpload} variant=\"outline\">\n          <CloudUploadIcon />\n          Upload files\n        </Button>\n        <Button className={press} onClick={onNewDoc}>\n          <FilePlusIcon />\n          New doc\n        </Button>\n      </div>\n    </motion.div>\n  );\n}\n\nexport function FolderView({\n  path = [\"Files\", \"Marketing\"],\n  name = \"Brand refresh\",\n  files: initialFiles = defaultFiles,\n  folders: initialFolders = defaultFolders,\n  members = [\"AK\", \"JS\", \"MV\", \"LO\"],\n  me = \"AK\",\n  defaultEmpty = false,\n  defaultView = \"grid\",\n  workspace = \"Northwind\",\n  className,\n}: FolderViewProps) {\n  const [view, setView] = useState(defaultView);\n  const [contents, setContents] = useState<Record<string, FolderFile[]>>(() => ({\n    root: defaultEmpty ? [] : initialFiles,\n    ...Object.fromEntries(initialFolders.map((f) => [f.id, f.files])),\n  }));\n  const [at, setAt] = useState(\"root\");\n  const [selected, setSelected] = useState<string[]>([]);\n  const [filter, setFilter] = useState<\"all\" | FolderFileKind>(\"all\");\n  const [toast, setToast] = useState<string | null>(null);\n  const added = useRef(0);\n  const id = useId();\n\n  useEffect(() => {\n    if (!toast) return;\n    const t = setTimeout(() => setToast(null), 2800);\n    return () => clearTimeout(t);\n  }, [toast]);\n\n  const sub = initialFolders.find((f) => f.id === at);\n  const title = sub?.name ?? name;\n  const trail = sub ? [...path, name] : path;\n  const files = contents[at] ?? [];\n  const kinds = useMemo(() => (Object.keys(kindLabel) as FolderFileKind[]).filter((k) => files.some((f) => f.kind === k)), [files]);\n  const activeFilter = filter !== \"all\" && kinds.includes(filter) ? filter : \"all\";\n  const visible = files.filter((f) => activeFilter === \"all\" || f.kind === activeFilter);\n  const showFolders = !sub && activeFilter === \"all\" && initialFolders.length > 0;\n  const isEmpty = files.length === 0;\n  const selecting = selected.length > 0;\n  const allSelected = visible.length > 0 && visible.every((f) => selected.includes(f.id));\n\n  const open = (target: string) => {\n    setAt(target);\n    setSelected([]);\n    setFilter(\"all\");\n  };\n  const toggle = (fid: string) => setSelected((s) => (s.includes(fid) ? s.filter((x) => x !== fid) : [...s, fid]));\n  const flash = (msg: string) => {\n    setToast(msg);\n    setSelected([]);\n  };\n  const remove = () => {\n    const n = selected.length;\n    setContents((c) => ({ ...c, [at]: (c[at] ?? []).filter((f) => !selected.includes(f.id)) }));\n    flash(`Moved ${n} ${n === 1 ? \"file\" : \"files\"} to trash`);\n  };\n  const add = (file: Omit<FolderFile, \"id\" | \"editedBy\" | \"edited\"> = uploads[added.current % uploads.length]) => {\n    added.current += 1;\n    const next: FolderFile = { ...file, id: `new-${added.current}`, editedBy: me, edited: \"Just now\" };\n    setContents((c) => ({ ...c, [at]: [next, ...(c[at] ?? [])] }));\n    setToast(`Added ${file.name} to ${title}`);\n  };\n\n  const onCardKey = (e: KeyboardEvent<HTMLDivElement>, fid: string) => {\n    if (e.key === \" \" || e.key === \"Enter\") {\n      e.preventDefault();\n      toggle(fid);\n    }\n  };\n\n  const grid = view === \"grid\";\n  const listCols = \"grid-cols-[1.75rem_minmax(0,1fr)_4.5rem] @2xl:grid-cols-[1.75rem_minmax(0,1fr)_5rem_6.5rem_6rem_4.5rem]\";\n\n  return (\n    <MotionConfig reducedMotion=\"user\">\n      <div\n        className={cn(\"@container relative flex h-[760px] w-full overflow-hidden bg-background text-foreground text-sm\", className)}\n        onKeyDown={(e) => {\n          if (e.key === \"Escape\" && selecting) setSelected([]);\n        }}\n      >\n        <aside className=\"hidden w-56 shrink-0 flex-col border-r bg-muted/30 px-3 py-3 @3xl:flex\">\n          <button\n            className=\"flex h-9 cursor-pointer items-center gap-2 rounded-lg px-1.5 text-left outline-none hover:bg-accent/60 focus-visible:ring-2 focus-visible:ring-ring\"\n            type=\"button\"\n          >\n            <span className=\"flex size-6 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground\">\n              <svg aria-hidden className=\"size-3.5\" fill=\"none\" viewBox=\"0 0 16 16\">\n                <path d=\"M2 9.5c2 2.7 10 2.7 12 0\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeWidth=\"2\" />\n                <path d=\"M4 5h8\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeWidth=\"2\" />\n              </svg>\n            </span>\n            <span className=\"min-w-0 flex-1 truncate font-medium\">{workspace}</span>\n            <ChevronsUpDownIcon className=\"size-3.5 text-muted-foreground\" />\n          </button>\n          <nav aria-label=\"Drive\" className=\"mt-4 flex flex-col gap-px\">\n            {places.map((p) => (\n              <button\n                className=\"flex h-8 cursor-pointer items-center gap-2.5 rounded-md px-2 text-left text-muted-foreground outline-none hover:bg-accent/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring\"\n                key={p.label}\n                type=\"button\"\n              >\n                <p.icon className=\"size-4 shrink-0 opacity-80\" />\n                {p.label}\n              </button>\n            ))}\n          </nav>\n          <div className=\"mt-6\">\n            <p className=\"px-2 pb-1.5 font-medium text-muted-foreground text-xs\">{path[path.length - 1] ?? \"Folders\"}</p>\n            <ul className=\"flex flex-col gap-px\">\n              <li>\n                <button\n                  aria-current={!sub ? \"page\" : undefined}\n                  className={cn(\n                    \"flex h-8 w-full cursor-pointer items-center gap-2.5 rounded-md px-2 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n                    !sub ? \"bg-accent font-medium text-foreground\" : \"text-muted-foreground hover:bg-accent/60 hover:text-foreground\",\n                  )}\n                  onClick={() => open(\"root\")}\n                  type=\"button\"\n                >\n                  <FolderGlyph className=\"h-3 w-3.5 text-orange-500 dark:text-orange-400\" />\n                  <span className=\"truncate\">{name}</span>\n                </button>\n              </li>\n              {initialFolders.map((f) => (\n                <li key={f.id}>\n                  <button\n                    aria-current={at === f.id ? \"page\" : undefined}\n                    className={cn(\n                      \"flex h-8 w-full cursor-pointer items-center gap-2.5 rounded-md ps-7 pe-2 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n                      at === f.id ? \"bg-accent font-medium text-foreground\" : \"text-muted-foreground hover:bg-accent/60 hover:text-foreground\",\n                    )}\n                    onClick={() => open(f.id)}\n                    type=\"button\"\n                  >\n                    <FolderGlyph className=\"h-3 w-3.5 text-muted-foreground/72\" />\n                    <span className=\"truncate\">{f.name}</span>\n                  </button>\n                </li>\n              ))}\n            </ul>\n          </div>\n          <div className=\"mt-auto px-2 pt-4 pb-1\">\n            <div className=\"flex items-baseline justify-between text-xs\">\n              <span className=\"font-medium\">Storage</span>\n              <span className=\"text-muted-foreground tabular-nums\">43%</span>\n            </div>\n            <span className=\"relative mt-2 block h-1 overflow-hidden rounded-full bg-foreground/8\">\n              <span className=\"absolute inset-y-0 left-0 w-[43%] rounded-full bg-foreground/72\" />\n            </span>\n            <p className=\"mt-2 text-muted-foreground text-xs tabular-nums\">42.6 GB of 100 GB used</p>\n          </div>\n        </aside>\n\n        <div className=\"flex min-w-0 flex-1 flex-col\">\n          <header className=\"flex h-14 shrink-0 items-center gap-3 border-b px-4 @3xl:px-6\">\n            <nav aria-label=\"Breadcrumb\" className=\"-ms-1 flex min-w-0 flex-1 items-center gap-0.5 text-muted-foreground\">\n              {sub && (\n                <button\n                  aria-label={`Back to ${name}`}\n                  className=\"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md outline-none hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring @md:hidden\"\n                  onClick={() => open(\"root\")}\n                  type=\"button\"\n                >\n                  <ArrowLeftIcon className=\"size-4\" />\n                </button>\n              )}\n              {trail.map((p, i) => {\n                const isParent = sub && i === trail.length - 1;\n                return (\n                  <span className={cn(\"flex min-w-0 items-center gap-0.5\", i < trail.length - 1 && \"hidden @md:flex\")} key={`${p}-${i}`}>\n                    <button\n                      className=\"flex h-7 cursor-pointer items-center truncate rounded-md px-1.5 outline-none hover:bg-accent/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring\"\n                      onClick={isParent ? () => open(\"root\") : undefined}\n                      type=\"button\"\n                    >\n                      {p}\n                    </button>\n                    <ChevronRightIcon aria-hidden className=\"size-3.5 shrink-0 opacity-56\" />\n                  </span>\n                );\n              })}\n              <span aria-current=\"page\" className=\"truncate px-1.5 font-medium text-foreground\">\n                {title}\n              </span>\n            </nav>\n            <div className=\"flex shrink-0 items-center gap-2\">\n              <div className=\"me-1 hidden -space-x-1 @2xl:flex\">\n                {members.map((m) => (\n                  <Avatar className=\"size-6 bg-background ring-2 ring-background\" key={m}>\n                    <AvatarFallback className={cn(\"font-medium text-[9px]\", people[m] ?? \"bg-muted\")}>{m}</AvatarFallback>\n                  </Avatar>\n                ))}\n              </div>\n              <Button className={cn(\"hidden @md:inline-flex\", press)} onClick={() => setToast(`Link to ${title} copied`)} variant=\"outline\">\n                <Share2Icon />\n                Share\n              </Button>\n              <Button aria-label=\"Upload\" className={press} onClick={() => add()}>\n                <CloudUploadIcon />\n                <span className=\"hidden @md:inline\">Upload</span>\n              </Button>\n            </div>\n          </header>\n\n          <div className=\"flex items-center gap-3 px-4 pt-6 @3xl:px-8\">\n            <span\n              className={cn(\n                \"flex size-10 shrink-0 items-center justify-center rounded-xl\",\n                sub ? \"bg-muted text-muted-foreground\" : \"bg-orange-500/12 text-orange-500 dark:text-orange-400\",\n              )}\n            >\n              <FolderGlyph className=\"h-4 w-5\" />\n            </span>\n            <div className=\"min-w-0 flex-1\">\n              <h1 className=\"truncate font-heading font-semibold text-xl tracking-tight\">{title}</h1>\n              <p className=\"text-muted-foreground text-xs tabular-nums\">\n                {files.length} {files.length === 1 ? \"file\" : \"files\"}\n                {!sub && initialFolders.length > 0 && ` · ${initialFolders.length} folders`} · shared with {members.length}\n              </p>\n            </div>\n          </div>\n\n          <div className=\"mx-4 mt-4 flex h-11 shrink-0 items-center gap-3 border-b @3xl:mx-8\">\n            <AnimatePresence initial={false} mode=\"popLayout\">\n              {selecting ? (\n                <motion.label\n                  animate={{ opacity: 1, x: 0 }}\n                  className=\"flex h-8 cursor-pointer items-center gap-2 font-medium\"\n                  exit={{ opacity: 0, x: -6 }}\n                  htmlFor={`${id}-all`}\n                  initial={{ opacity: 0, x: -6 }}\n                  key=\"all\"\n                  transition={{ duration: 0.18, ease: easeOut }}\n                >\n                  <Checkbox\n                    checked={allSelected}\n                    id={`${id}-all`}\n                    indeterminate={!allSelected}\n                    onCheckedChange={() => setSelected(allSelected ? [] : visible.map((f) => f.id))}\n                  />\n                  Select all\n                </motion.label>\n              ) : isEmpty ? (\n                <motion.span animate={{ opacity: 1 }} className=\"text-muted-foreground text-xs\" initial={{ opacity: 0 }} key=\"none\" transition={{ duration: 0.18 }}>\n                  No files yet\n                </motion.span>\n              ) : (\n                <motion.div\n                  animate={{ opacity: 1, x: 0 }}\n                  aria-label=\"File type\"\n                  className=\"-mx-1 flex min-w-0 items-center gap-0.5 overflow-x-auto px-1 [scrollbar-width:none]\"\n                  exit={{ opacity: 0, x: -6 }}\n                  initial={{ opacity: 0, x: -6 }}\n                  key=\"filters\"\n                  role=\"radiogroup\"\n                  transition={{ duration: 0.18, ease: easeOut }}\n                >\n                  <LayoutGroup id={`${id}-filter`}>\n                    {([\"all\", ...kinds] as const).map((k) => (\n                      <button\n                        aria-checked={activeFilter === k}\n                        className={cn(\n                          \"relative flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2 font-medium text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n                          activeFilter === k ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\",\n                        )}\n                        key={k}\n                        onClick={() => setFilter(k)}\n                        role=\"radio\"\n                        type=\"button\"\n                      >\n                        {activeFilter === k && (\n                          <motion.span className=\"absolute inset-0 rounded-md bg-accent\" layoutId={`${id}-filter-on`} transition={{ type: \"spring\", stiffness: 520, damping: 40 }} />\n                        )}\n                        {k !== \"all\" && <span className={cn(\"relative size-1.5 rounded-full\", kindDot[k])} />}\n                        <span className=\"relative\">{k === \"all\" ? \"All\" : kindLabel[k]}</span>\n                        <span className=\"relative text-muted-foreground tabular-nums\">{k === \"all\" ? files.length : files.filter((f) => f.kind === k).length}</span>\n                      </button>\n                    ))}\n                  </LayoutGroup>\n                </motion.div>\n              )}\n            </AnimatePresence>\n            <LayoutGroup id={`${id}-view`}>\n              <div aria-label=\"Layout\" className=\"ms-auto flex shrink-0 rounded-lg bg-muted p-0.5\" role=\"radiogroup\">\n                {(\n                  [\n                    [\"grid\", LayoutGridIcon, \"Grid\"],\n                    [\"list\", ListIcon, \"List\"],\n                  ] as const\n                ).map(([v, Icon, label]) => (\n                  <button\n                    aria-checked={view === v}\n                    aria-label={`${label} view`}\n                    className={cn(\n                      \"relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n                      view === v ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\",\n                    )}\n                    key={v}\n                    onClick={() => setView(v)}\n                    role=\"radio\"\n                    type=\"button\"\n                  >\n                    {view === v && <motion.span className=\"absolute inset-0 rounded-md bg-background shadow-xs/5 dark:bg-input\" layoutId={`${id}-view-on`} transition={spring} />}\n                    <Icon className=\"relative size-3.5\" />\n                  </button>\n                ))}\n              </div>\n            </LayoutGroup>\n          </div>\n\n          <div className=\"relative min-h-0 flex-1 overflow-y-auto\">\n            <AnimatePresence initial={false} mode=\"wait\">\n              <motion.div\n                animate={{ opacity: 1, x: 0 }}\n                className=\"h-full\"\n                exit={{ opacity: 0, x: sub ? 8 : -8 }}\n                initial={{ opacity: 0, x: sub ? 8 : -8 }}\n                key={`${at}-${view}`}\n                transition={{ duration: 0.18, ease: easeOut }}\n              >\n                {isEmpty ? (\n                  <EmptyFolder name={title} onNewDoc={() => add({ name: \"Untitled doc\", kind: \"doc\", size: \"1 KB\" })} onUpload={() => add()} />\n                ) : grid ? (\n                  <>\n                    {showFolders && (\n                      <ul aria-label=\"Folders\" className=\"grid grid-cols-2 gap-3 px-4 pt-5 @2xl:grid-cols-3 @5xl:grid-cols-4 @3xl:px-8\">\n                        {initialFolders.map((f) => {\n                          const n = contents[f.id]?.length ?? 0;\n                          return (\n                            <li key={f.id}>\n                              <button\n                                className={cn(\n                                  \"flex h-14 w-full cursor-pointer items-center gap-3 rounded-xl border bg-card px-3.5 text-left outline-none hover:border-foreground/16 focus-visible:ring-2 focus-visible:ring-ring\",\n                                  press,\n                                )}\n                                onClick={() => open(f.id)}\n                                type=\"button\"\n                              >\n                                <FolderGlyph className=\"h-4 w-5 text-muted-foreground/72\" />\n                                <span className=\"flex min-w-0 flex-col\">\n                                  <span className=\"truncate font-medium\">{f.name}</span>\n                                  <span className=\"text-muted-foreground text-xs tabular-nums\">{n ? `${n} ${n === 1 ? \"file\" : \"files\"}` : \"Empty\"}</span>\n                                </span>\n                                <ChevronRightIcon aria-hidden className=\"ms-auto hidden size-4 shrink-0 text-muted-foreground/60 @md:block\" />\n                              </button>\n                            </li>\n                          );\n                        })}\n                      </ul>\n                    )}\n                    <ul aria-label=\"Files\" className=\"grid grid-cols-2 gap-3 px-4 pt-3 pb-28 @2xl:grid-cols-3 @5xl:grid-cols-4 @3xl:px-8 [&:first-child]:pt-5\">\n                      <AnimatePresence initial={false} mode=\"popLayout\">\n                        {visible.map((f) => {\n                          const on = selected.includes(f.id);\n                          return (\n                            <motion.li animate={{ opacity: 1, scale: 1 }} exit={{ opacity: 0, scale: 0.95 }} initial={{ opacity: 0, scale: 0.95 }} key={f.id} layout transition={spring}>\n                              <div\n                                aria-checked={on}\n                                aria-label={`${f.name}, ${kindLabel[f.kind]}, ${f.size}`}\n                                className={cn(\n                                  \"group/file relative flex cursor-pointer select-none flex-col overflow-hidden rounded-xl border bg-card outline-none transition-[box-shadow,border-color,scale] duration-150 ease-out focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.98]\",\n                                  on ? \"border-foreground/40 ring-3 ring-foreground/8\" : \"hover:border-foreground/16 hover:shadow-xs/5\",\n                                )}\n                                onClick={() => toggle(f.id)}\n                                onKeyDown={(e) => onCardKey(e, f.id)}\n                                role=\"checkbox\"\n                                tabIndex={0}\n                              >\n                                <div className=\"relative h-28 overflow-hidden bg-muted/60 @md:h-32 dark:bg-muted/72\">\n                                  <motion.div animate={{ scale: on ? 0.94 : 1 }} className=\"absolute inset-0\" transition={spring}>\n                                    <Preview file={f} />\n                                  </motion.div>\n                                  <span\n                                    className={cn(\n                                      \"absolute top-2 left-2 flex size-6 items-center justify-center rounded-md bg-background/88 shadow-xs/5 backdrop-blur transition-opacity duration-150\",\n                                      on || selecting ? \"opacity-100\" : \"opacity-0 group-hover/file:opacity-100 group-focus-visible/file:opacity-100 pointer-coarse:opacity-100\",\n                                    )}\n                                  >\n                                    <CheckMark on={on} />\n                                  </span>\n                                </div>\n                                <div className=\"flex flex-col gap-1 border-t px-3 py-2.5\">\n                                  <span className=\"truncate font-medium\">{f.name}</span>\n                                  <span className=\"flex items-center gap-1.5 text-muted-foreground text-xs\">\n                                    <span className={cn(\"size-1.5 shrink-0 rounded-full\", kindDot[f.kind])} />\n                                    <span className=\"truncate tabular-nums\">\n                                      {kindLabel[f.kind]} · {f.size}\n                                    </span>\n                                    <Avatar className=\"ms-auto size-4 shrink-0\">\n                                      <AvatarFallback className={cn(\"font-medium text-[7px]\", people[f.editedBy] ?? \"bg-muted\")}>{f.editedBy}</AvatarFallback>\n                                    </Avatar>\n                                    <span className=\"hidden shrink-0 tabular-nums @md:inline\">{f.edited}</span>\n                                  </span>\n                                </div>\n                              </div>\n                            </motion.li>\n                          );\n                        })}\n                      </AnimatePresence>\n                    </ul>\n                  </>\n                ) : (\n                  <div className=\"px-4 pt-3 pb-28 @3xl:px-8\">\n                    <div className={cn(\"grid h-9 items-center gap-3 px-2 font-medium text-muted-foreground text-xs\", listCols)}>\n                      <span />\n                      <span>Name</span>\n                      <span className=\"hidden @2xl:block\">Type</span>\n                      <span className=\"hidden @2xl:block\">Edited by</span>\n                      <span className=\"hidden @2xl:block\">Edited</span>\n                      <span className=\"text-end\">Size</span>\n                    </div>\n                    <ul aria-label=\"Files\" className=\"border-t\">\n                      {showFolders &&\n                        initialFolders.map((f) => {\n                          const n = contents[f.id]?.length ?? 0;\n                          return (\n                            <li className=\"border-b\" key={f.id}>\n                              <button\n                                className={cn(\"grid h-12 w-full cursor-pointer items-center gap-3 rounded-md px-2 text-left outline-none hover:bg-accent/48 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset\", listCols)}\n                                onClick={() => open(f.id)}\n                                type=\"button\"\n                              >\n                                <span />\n                                <span className=\"flex min-w-0 items-center gap-3\">\n                                  <span className=\"flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground\">\n                                    <FolderGlyph className=\"h-3 w-3.5\" />\n                                  </span>\n                                  <span className=\"truncate font-medium\">{f.name}</span>\n                                </span>\n                                <span className=\"hidden text-muted-foreground @2xl:block\">Folder</span>\n                                <span className=\"hidden text-muted-foreground @2xl:block\">—</span>\n                                <span className=\"hidden text-muted-foreground @2xl:block\">—</span>\n                                <span className=\"text-end text-muted-foreground tabular-nums\">{n ? `${n} ${n === 1 ? \"file\" : \"files\"}` : \"Empty\"}</span>\n                              </button>\n                            </li>\n                          );\n                        })}\n                      <AnimatePresence initial={false} mode=\"popLayout\">\n                        {visible.map((f) => {\n                          const on = selected.includes(f.id);\n                          const K = kindIcon[f.kind];\n                          return (\n                            <motion.li\n                              animate={{ opacity: 1 }}\n                              className=\"border-b\"\n                              exit={{ opacity: 0 }}\n                              initial={{ opacity: 0 }}\n                              key={f.id}\n                              layout=\"position\"\n                              transition={{ opacity: { duration: 0.15 }, layout: spring }}\n                            >\n                              <div\n                                aria-checked={on}\n                                aria-label={`${f.name}, ${kindLabel[f.kind]}, ${f.size}`}\n                                className={cn(\n                                  \"grid h-12 cursor-pointer select-none items-center gap-3 rounded-md px-2 outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset\",\n                                  listCols,\n                                  on ? \"bg-accent\" : \"hover:bg-accent/48\",\n                                )}\n                                onClick={() => toggle(f.id)}\n                                onKeyDown={(e) => onCardKey(e, f.id)}\n                                role=\"checkbox\"\n                                tabIndex={0}\n                              >\n                                <CheckMark on={on} />\n                                <span className=\"flex min-w-0 items-center gap-3\">\n                                  <span className={cn(\"flex size-7 shrink-0 items-center justify-center rounded-md\", K.tint)}>\n                                    <K.icon className=\"size-3.5\" />\n                                  </span>\n                                  <span className=\"truncate font-medium\">{f.name}</span>\n                                </span>\n                                <span className=\"hidden text-muted-foreground @2xl:block\">{kindLabel[f.kind]}</span>\n                                <span className=\"hidden items-center gap-2 text-muted-foreground @2xl:flex\">\n                                  <Avatar className=\"size-5 shrink-0\">\n                                    <AvatarFallback className={cn(\"font-medium text-[8px]\", people[f.editedBy] ?? \"bg-muted\")}>{f.editedBy}</AvatarFallback>\n                                  </Avatar>\n                                  {f.editedBy === me ? \"You\" : f.editedBy}\n                                </span>\n                                <span className=\"hidden text-muted-foreground tabular-nums @2xl:block\">{f.edited}</span>\n                                <span className=\"text-end text-muted-foreground tabular-nums\">{f.size}</span>\n                              </div>\n                            </motion.li>\n                          );\n                        })}\n                      </AnimatePresence>\n                    </ul>\n                  </div>\n                )}\n              </motion.div>\n            </AnimatePresence>\n          </div>\n        </div>\n\n        <AnimatePresence>\n          {selecting && (\n            <motion.div\n              animate={{ y: 0, opacity: 1, scale: 1 }}\n              aria-label=\"Bulk actions\"\n              className=\"absolute inset-x-3 bottom-4 z-20 mx-auto flex max-w-fit origin-bottom items-center gap-1 rounded-xl border bg-popover p-1 shadow-lg/10 @3xl:left-56\"\n              exit={{ y: 16, opacity: 0, scale: 0.96, transition: { duration: 0.15, ease: easeOut } }}\n              initial={{ y: 16, opacity: 0, scale: 0.96 }}\n              role=\"toolbar\"\n              transition={spring}\n            >\n              <span className=\"flex items-center gap-1 ps-2.5 pe-2 font-medium\">\n                <RollingCount value={selected.length} />\n                <span>selected</span>\n              </span>\n              <span className=\"mx-1 h-5 w-px bg-border\" />\n              {(\n                [\n                  [\"Share\", Share2Icon, () => flash(`Link copied for ${selected.length} ${selected.length === 1 ? \"file\" : \"files\"}`)],\n                  [\"Move\", FolderInputIcon, () => flash(`Moved to ${name} / Archive 2025`)],\n                  [\"Download\", DownloadIcon, () => flash(`Zipping ${selected.length} ${selected.length === 1 ? \"file\" : \"files\"}…`)],\n                ] as const\n              ).map(([label, Icon, run]) => (\n                <Tooltip key={label}>\n                  <TooltipTrigger render={<Button aria-label={label} className={cn(\"@lg:w-auto @lg:px-2.5\", press)} onClick={run} size=\"icon\" variant=\"ghost\" />}>\n                    <Icon />\n                    <span className=\"hidden @lg:inline\">{label}</span>\n                  </TooltipTrigger>\n                  <TooltipPopup className=\"@lg:hidden\">{label}</TooltipPopup>\n                </Tooltip>\n              ))}\n              <Button\n                aria-label=\"Delete\"\n                className={cn(\"text-destructive-foreground hover:bg-destructive/8 @lg:w-auto @lg:px-2.5\", press)}\n                onClick={remove}\n                size=\"icon\"\n                variant=\"ghost\"\n              >\n                <Trash2Icon />\n                <span className=\"hidden @lg:inline\">Delete</span>\n              </Button>\n              <span className=\"mx-1 h-5 w-px bg-border\" />\n              <Button aria-label=\"Clear selection\" className={press} onClick={() => setSelected([])} size=\"icon\" variant=\"ghost\">\n                <XIcon />\n              </Button>\n            </motion.div>\n          )}\n        </AnimatePresence>\n\n        <AnimatePresence>\n          {toast && !selecting && (\n            <motion.div\n              animate={{ y: 0, opacity: 1 }}\n              className=\"absolute inset-x-3 bottom-4 z-20 mx-auto flex max-w-fit items-center gap-3 rounded-xl border bg-popover py-1.5 ps-3.5 pe-1.5 shadow-lg/10 @3xl:left-56\"\n              exit={{ y: 12, opacity: 0, transition: { duration: 0.15, ease: easeOut } }}\n              initial={{ y: 12, opacity: 0 }}\n              role=\"status\"\n              transition={spring}\n            >\n              <span className=\"truncate\">{toast}</span>\n              <Button className={press} onClick={() => setToast(null)} size=\"xs\" variant=\"ghost\">\n                Dismiss\n              </Button>\n            </motion.div>\n          )}\n        </AnimatePresence>\n      </div>\n    </MotionConfig>\n  );\n}\n"
    }
  ]
}