{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lists-17",
  "type": "registry:block",
  "description": "Inbox master-detail list with a reading pane and mobile back navigation.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/lists/lists-17.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Archive,\n  ArrowLeft,\n  Reply,\n  Star,\n} from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst messages = [\n  { id: 1, from: \"Sara\", initials: \"SA\", hue: 330, subject: \"Crit notes: Dalim UI landing page\", preview: \"Overall the page is much tighter. Three things I'd still push on...\", time: \"09:42\", unread: true, body: [\"Overall the landing page is much tighter than last week. Three things I'd still push on:\", \"1. The hero subline reads long. Let's lead with 'design se code tak'.\", \"2. The blocks grid needs an empty state for filters with no results.\", \"3. The pricing toggle should match the Designali Pro plan names.\", \"Happy to pair on any of these this afternoon.\"] },\n  { id: 2, from: \"Designali Billing\", initials: \"B\", hue: 160, subject: \"Your November invoice is ready\", preview: \"Invoice #4021 for $1,240.00 is available to download.\", time: \"08:15\", unread: true, body: [\"Invoice #4021 for $1,240.00 is now available.\", \"It covers 31 seats on the Designali Team plan from Nov 1 to Nov 30, 2026. Questions? Reply to billing@designali.com.\"] },\n  { id: 3, from: \"Omar\", initials: \"OM\", hue: 200, subject: \"Re: hero block perf regression\", preview: \"Bisected it to the shadow change. Fix is in #2190, needs one review.\", time: \"Yesterday\", unread: false, body: [\"Bisected it to the shadow change in the hero blocks. Every card was repainting on scroll.\", \"Fix is in #2190. It needs one review and I'd like it in Thursday's designali.com release.\"] },\n  { id: 4, from: \"Ali Imam\", initials: \"AI\", hue: 270, subject: \"Q1 templates roadmap, first draft\", preview: \"Shared the draft. Comments open until Friday, then we lock scope.\", time: \"Mon\", unread: false, body: [\"I've shared the first draft of the Q1 Designali templates roadmap.\", \"Comments are open until Friday. After that we lock scope and I'll post the summary to the studio.\"] },\n]\n\nexport default function Lists17() {\n  const [activeId, setActiveId] = useState(messages[0]!.id)\n  const [showDetail, setShowDetail] = useState(false)\n  const active = messages.find((m) => m.id === activeId) ?? messages[0]!\n\n  return (\n    <section className=\"w-full bg-muted/30 py-24\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"grid min-h-[520px] border border-border bg-background md:grid-cols-[340px_1fr]\">\n          <div className={cn(\"border-border md:border-r\", showDetail && \"hidden md:block\")}>\n            <div className=\"flex items-center justify-between border-b border-border px-5 py-4\">\n              <h2 className=\"font-semibold\">Inbox</h2>\n              <span className=\"font-sans text-xs text-muted-foreground\">\n                {messages.filter((m) => m.unread).length} unread\n              </span>\n            </div>\n            <ul className=\"divide-y divide-border\">\n              {messages.map((message) => (\n                <li key={message.id}>\n                  <button\n                    type=\"button\"\n                    onClick={() => {\n                      setActiveId(message.id)\n                      setShowDetail(true)\n                    }}\n                    className={cn(\n                      \"flex w-full gap-3 px-5 py-4 text-left transition-colors\",\n                      activeId === message.id ? \"bg-muted\" : \"hover:bg-muted/50\"\n                    )}\n                  >\n                    <span\n                      className=\"flex size-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold text-white\"\n                      style={{ backgroundColor: `oklch(0.55 0.14 ${message.hue})` }}\n                    >\n                      {message.initials}\n                    </span>\n                    <span className=\"min-w-0 flex-1\">\n                      <span className=\"flex items-center justify-between gap-2\">\n                        <span className={cn(\"truncate text-sm\", message.unread && \"font-semibold\")}>{message.from}</span>\n                        <span className=\"shrink-0 text-[10px] text-muted-foreground\">{message.time}</span>\n                      </span>\n                      <span className={cn(\"block truncate text-sm\", message.unread ? \"text-foreground\" : \"text-muted-foreground\")}>\n                        {message.subject}\n                      </span>\n                      <span className=\"block truncate text-xs text-muted-foreground\">{message.preview}</span>\n                    </span>\n                  </button>\n                </li>\n              ))}\n            </ul>\n          </div>\n\n          <article className={cn(\"flex flex-col\", !showDetail && \"hidden md:flex\")}>\n            <header className=\"flex items-center justify-between gap-4 border-b border-border px-5 py-3\">\n              <button\n                type=\"button\"\n                onClick={() => setShowDetail(false)}\n                className=\"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground md:invisible\"\n              >\n                <ArrowLeft className=\"size-3.5\" /> Back\n              </button>\n              <div className=\"flex gap-1\">\n                {[Star, Archive, Reply].map((Icon, index) => (\n                  <button\n                    key={index}\n                    type=\"button\"\n                    aria-label={[\"Star\", \"Archive\", \"Reply\"][index]}\n                    className=\"flex size-8 items-center justify-center text-muted-foreground hover:bg-muted hover:text-foreground\"\n                  >\n                    <Icon className=\"size-4\" />\n                  </button>\n                ))}\n              </div>\n            </header>\n            <div className=\"flex-1 p-6 md:p-8\">\n              <h3 className=\"text-xl font-semibold tracking-tight md:text-2xl\">{active.subject}</h3>\n              <p className=\"mt-2 text-sm text-muted-foreground\">\n                From <span className=\"text-foreground\">{active.from}</span> · {active.time}\n              </p>\n              <div className=\"mt-8 max-w-prose space-y-4 text-sm leading-7\">\n                {active.body.map((paragraph) => (\n                  <p key={paragraph}>{paragraph}</p>\n                ))}\n              </div>\n            </div>\n          </article>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "700px"
  },
  "categories": [
    "lists"
  ]
}