{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "swipe-tabs-profile-counts",
  "title": "Swipe Tabs Profile Counts",
  "description": "A profile with Posts, Replies and Likes tabs that show counts in their names, update the counts when content changes and swipe between panels under a fixed header. Use this when a profile or account screen has several lists of different things and each has a count worth showing.",
  "registryDependencies": [
    "avatar",
    "@tealmac/swipe-tabs"
  ],
  "files": [
    {
      "path": "registry/patterns/swipe-tabs-profile-counts/swipe-tabs-profile-counts.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Avatar, AvatarFallback } from \"@/components/ui/avatar\"\nimport { SwipeTabs } from \"@/components/ui/swipe-tabs\"\n\nexport interface ProfileList {\n  id: string\n  label: string\n  items: string[]\n}\n\nexport interface SwipeTabsProfileCountsProps {\n  name: string\n  lists: ProfileList[]\n}\n\nexport function SwipeTabsProfileCounts({\n  name,\n  lists,\n}: SwipeTabsProfileCountsProps) {\n  return (\n    <div className=\"bg-background flex h-96 w-full max-w-sm flex-col overflow-hidden rounded-xl border\">\n      <header className=\"flex items-center gap-3 p-4\">\n        <Avatar aria-hidden className=\"size-14\">\n          <AvatarFallback>{name.slice(0, 2).toUpperCase()}</AvatarFallback>\n        </Avatar>\n        <h2 className=\"text-lg font-semibold\">{name}</h2>\n      </header>\n      <SwipeTabs\n        label=\"Profile\"\n        className=\"min-h-0 flex-1\"\n        tabs={lists.map((list) => ({\n          id: list.id,\n          label: `${list.label}, ${list.items.length}`,\n          content: (\n            <ul className=\"divide-y px-4\">\n              {list.items.map((item) => (\n                <li key={item} className=\"py-3 text-sm\">\n                  {item}\n                </li>\n              ))}\n              {list.items.length === 0 && (\n                <li className=\"text-muted-foreground py-6 text-center text-sm\">\n                  Nothing yet\n                </li>\n              )}\n            </ul>\n          ),\n        }))}\n      />\n    </div>\n  )\n}\n",
      "type": "registry:block"
    }
  ],
  "type": "registry:block"
}