{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "page-header-01",
  "description": "A page title and description with a secondary action and a main action.",
  "registryDependencies": [
    "button",
    "https://www.dashboardblocks.com/r/radix/block-state.json",
    "https://www.dashboardblocks.com/r/radix/page-header.json"
  ],
  "files": [
    {
      "path": "registry/components/dashboardblocks/page-header/page-header-01.tsx",
      "content": "'use client'\n\nimport {\n  BlockStateProvider,\n  BlockStateText,\n  type BlockStateProps,\n  getBlockState,\n} from '@/registry/components/dashboardblocks/block-state'\nimport {\n  PageHeader,\n  PageHeaderActions,\n  PageHeaderHeading,\n  PageHeaderRow,\n} from '@/registry/components/dashboardblocks/page-header'\nimport { IconPlaceholder } from '@/registry/icons/icon-placeholder'\n\nimport { Button } from '@/components/ui/button'\n\ninterface PageHeader1Props extends BlockStateProps {\n  /** Names the main action; `null` leaves the main action out. @default 'New order' */\n  createLabel?: string | null\n  /** Leave out to show the empty state. */\n  description?: string\n  /** Names the export action; `null` leaves it out. @default 'Export' */\n  exportLabel?: string | null\n  onCreate?: () => void\n  onExport?: () => void\n  title: string\n}\n\nconst exampleProps: PageHeader1Props = {\n  description: '1,284 orders this month, 38 of them waiting to ship.',\n  title: 'Orders',\n}\n\nconst PageHeader1 = (props: PageHeader1Props) => {\n  const {\n    createLabel = 'New order',\n    description,\n    exportLabel = 'Export',\n    onCreate = () => {},\n    onExport = () => {},\n    errorMessage,\n    status,\n    title,\n  } = props\n  const state = getBlockState(status, description)\n\n  return (\n    <BlockStateProvider errorMessage={errorMessage} state={state}>\n      <PageHeader>\n        <PageHeaderRow className='@2xl/page-header:items-end'>\n          <PageHeaderHeading\n            title={title}\n            description={state ? <BlockStateText /> : description}\n          />\n          {(exportLabel !== null || createLabel !== null) && (\n            <PageHeaderActions>\n              {exportLabel !== null && (\n                <Button\n                  variant='outline'\n                  disabled={state !== undefined}\n                  onClick={onExport}\n                >\n                  <IconPlaceholder\n                    lucide='DownloadIcon'\n                    tabler='IconDownload'\n                    hugeicons='Download01Icon'\n                    phosphor='DownloadIcon'\n                    remixicon='RiDownloadLine'\n                    data-icon='inline-start'\n                  />\n                  {exportLabel}\n                </Button>\n              )}\n              {createLabel !== null && (\n                <Button onClick={onCreate}>\n                  <IconPlaceholder\n                    lucide='PlusIcon'\n                    tabler='IconPlus'\n                    hugeicons='PlusSignIcon'\n                    phosphor='PlusIcon'\n                    remixicon='RiAddLine'\n                    data-icon='inline-start'\n                  />\n                  {createLabel}\n                </Button>\n              )}\n            </PageHeaderActions>\n          )}\n        </PageHeaderRow>\n      </PageHeader>\n    </BlockStateProvider>\n  )\n}\n\nexport { PageHeader1, exampleProps as pageHeader1ExampleProps, type PageHeader1Props }\n",
      "type": "registry:component",
      "target": "@components/dashboardblocks/page-header/page-header-01.tsx"
    }
  ],
  "meta": {
    "shows": "A page title and description with a secondary action and a main action.",
    "size": "full",
    "usedWith": [
      "data-table-02",
      "forms-01"
    ],
    "component": "PageHeader1",
    "props": "{ createLabel?: null | string; description?: string; exportLabel?: null | string; onCreate?: () => void; onExport?: () => void; title: string; errorMessage?: string; status?: \"loading\" | \"error\" }"
  },
  "type": "registry:component"
}
