{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "publish-bar",
  "type": "registry:ui",
  "title": "Publish bar",
  "description": "React publish bar with a draft, scheduled or published status badge, an autosave note, and Preview and Publish buttons wired to an onPublish callback.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/button.json",
    "https://ui.minidev.pro/r/status-badge.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/publish-bar.tsx",
      "type": "registry:ui",
      "target": "components/ui/publish-bar.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { StatusBadge } from \"@/components/ui/status-badge\"\n\nfunction PublishBar({\n  status = \"draft\",\n  onPublish,\n  className,\n}: {\n  status?: \"draft\" | \"published\" | \"scheduled\"\n  onPublish?: () => void\n  className?: string\n}) {\n  return (\n    <div data-slot=\"publish-bar\" className={cn(\"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-border bg-surface px-4 py-3 shadow-highlight\", className)}>\n      <div className=\"flex items-center gap-2\">\n        <StatusBadge tone={status === \"published\" ? \"success\" : status === \"scheduled\" ? \"accent\" : \"neutral\"}>{status}</StatusBadge>\n        <p className=\"text-sm text-fg-muted\">Changes save automatically</p>\n      </div>\n      <div className=\"flex gap-2\">\n        <Button type=\"button\" variant=\"outline\" size=\"sm\">Preview</Button>\n        <Button type=\"button\" size=\"sm\" onClick={onPublish}>Publish</Button>\n      </div>\n    </div>\n  )\n}\nexport { PublishBar }\n"
    }
  ]
}
