{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "v-sheet-10",
  "description": "Issue Detail",
  "registryDependencies": [
    "@cnippet/sheet"
  ],
  "files": [
    {
      "path": "registry/default/variants/v-sheet-10.tsx",
      "content": "// title: Issue Detail\n\"use client\";\n\nimport {\n  CalendarIcon,\n  CircleDotIcon,\n  FlagIcon,\n  MessageSquareIcon,\n  PaperclipIcon,\n  SendIcon,\n  TagIcon,\n} from \"lucide-react\";\nimport { useState } from \"react\";\nimport {\n  Avatar,\n  AvatarFallback,\n  AvatarImage,\n} from \"@/registry/default/ui/avatar\";\nimport { Badge } from \"@/registry/default/ui/badge\";\nimport { Button } from \"@/registry/default/ui/button\";\nimport {\n  Sheet,\n  SheetClose,\n  SheetDescription,\n  SheetFooter,\n  SheetHeader,\n  SheetPanel,\n  SheetPopup,\n  SheetTitle,\n  SheetTrigger,\n} from \"@/registry/default/ui/sheet\";\nimport { Textarea } from \"@/registry/default/ui/textarea\";\n\nconst comments = [\n  {\n    avatar:\n      \"https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?w=64&h=64&dpr=2&q=80\",\n    body: \"I think we should also handle the edge case where the session token expires mid-request. Should we add a refresh flow?\",\n    id: 1,\n    initials: \"MK\",\n    name: \"Marcus Kim\",\n    time: \"2 hr ago\",\n  },\n  {\n    avatar:\n      \"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=64&h=64&dpr=2&q=80\",\n    body: \"Good point. I'll add that to the acceptance criteria. The refresh logic can live in the auth middleware.\",\n    id: 2,\n    initials: \"SC\",\n    name: \"Sarah Chen\",\n    time: \"1 hr ago\",\n  },\n];\n\nconst meta = [\n  {\n    icon: CircleDotIcon,\n    label: \"Status\",\n    value: <Badge variant=\"warning\">In Progress</Badge>,\n  },\n  {\n    icon: FlagIcon,\n    label: \"Priority\",\n    value: <Badge variant=\"error\">High</Badge>,\n  },\n  {\n    icon: CalendarIcon,\n    label: \"Due date\",\n    value: <span className=\"text-sm\">Nov 14, 2026</span>,\n  },\n  {\n    icon: TagIcon,\n    label: \"Labels\",\n    value: (\n      <div className=\"flex gap-1\">\n        <Badge variant=\"outline\">auth</Badge>\n        <Badge variant=\"outline\">backend</Badge>\n      </div>\n    ),\n  },\n];\n\nexport function Pattern() {\n  const [comment, setComment] = useState(\"\");\n\n  return (\n    <div className=\"flex items-center justify-center\">\n      <Sheet>\n        <SheetTrigger render={<Button variant=\"outline\" />}>\n          <CircleDotIcon aria-hidden=\"true\" />\n          View Issue\n        </SheetTrigger>\n        <SheetPopup className=\"sm:max-w-lg\">\n          <SheetHeader>\n            <div className=\"flex items-start gap-2 pr-8\">\n              <SheetTitle className=\"leading-snug\">\n                Implement session refresh for expired auth tokens\n              </SheetTitle>\n            </div>\n            <SheetDescription>Issue #117 · opened 3 days ago</SheetDescription>\n          </SheetHeader>\n          <SheetPanel className=\"space-y-5\">\n            <div className=\"divide-y rounded-lg border\">\n              {meta.map(({ icon: Icon, label, value }) => (\n                <div className=\"flex items-center gap-3 px-3 py-2\" key={label}>\n                  <Icon\n                    aria-hidden=\"true\"\n                    className=\"size-3.5 shrink-0 text-muted-foreground\"\n                  />\n                  <span className=\"w-20 shrink-0 text-muted-foreground text-xs\">\n                    {label}\n                  </span>\n                  {value}\n                </div>\n              ))}\n            </div>\n\n            <div>\n              <p className=\"mb-2 font-medium text-sm\">Description</p>\n              <p className=\"text-muted-foreground text-sm leading-relaxed\">\n                When a user's session token expires mid-request, the app should\n                silently refresh the token using the refresh token stored in an\n                HttpOnly cookie and retry the original request without any user\n                interruption.\n              </p>\n            </div>\n\n            <div className=\"space-y-3\">\n              <div className=\"flex items-center gap-2 font-medium text-sm\">\n                <MessageSquareIcon className=\"size-3.5\" />\n                Comments ({comments.length})\n              </div>\n              {comments.map((c) => (\n                <div className=\"flex gap-3\" key={c.id}>\n                  <Avatar className=\"size-7 shrink-0\">\n                    <AvatarImage alt={c.name} src={c.avatar} />\n                    <AvatarFallback className=\"text-xs\">\n                      {c.initials}\n                    </AvatarFallback>\n                  </Avatar>\n                  <div className=\"flex-1 rounded-lg border p-2.5\">\n                    <div className=\"flex items-center justify-between gap-2\">\n                      <span className=\"font-medium text-xs\">{c.name}</span>\n                      <span className=\"text-muted-foreground text-xs\">\n                        {c.time}\n                      </span>\n                    </div>\n                    <p className=\"mt-1 text-muted-foreground text-xs leading-relaxed\">\n                      {c.body}\n                    </p>\n                  </div>\n                </div>\n              ))}\n              <div className=\"flex gap-3\">\n                <Avatar className=\"size-7 shrink-0\">\n                  <AvatarImage\n                    alt=\"You\"\n                    src=\"https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=64&h=64&dpr=2&q=80\"\n                  />\n                  <AvatarFallback className=\"text-xs\">LR</AvatarFallback>\n                </Avatar>\n                <Textarea\n                  className=\"min-h-[72px] flex-1 resize-none text-sm\"\n                  onChange={(e) => setComment(e.target.value)}\n                  placeholder=\"Leave a comment…\"\n                  value={comment}\n                />\n              </div>\n            </div>\n          </SheetPanel>\n          <SheetFooter>\n            <div className=\"flex w-full items-center justify-between gap-2\">\n              <Button size=\"icon\" variant=\"ghost\">\n                <PaperclipIcon className=\"size-4\" />\n              </Button>\n              <div className=\"flex gap-2\">\n                <SheetClose render={<Button variant=\"ghost\" />}>\n                  Close\n                </SheetClose>\n                <Button disabled={!comment.trim()}>\n                  <SendIcon className=\"size-3.5\" />\n                  Comment\n                </Button>\n              </div>\n            </div>\n          </SheetFooter>\n        </SheetPopup>\n      </Sheet>\n    </div>\n  );\n}\n",
      "type": "registry:block"
    }
  ],
  "meta": {
    "className": ""
  },
  "categories": [
    "sheet"
  ],
  "type": "registry:block"
}