{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toolbar",
  "title": "Toolbar",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-native/components/toolbar/Toolbar.tsx",
      "content": "import * as React from 'react'\nimport { cssInterop } from 'react-native-css-interop'\nimport * as Primitive from '@rn-primitives/toolbar'\nimport { renderTextChildren } from '@/lib/label-children'\nimport { cn } from '@/lib/utils'\n\nexport type ToolbarProps = Primitive.RootProps & { className?: string }\nexport const Toolbar = React.forwardRef<Primitive.RootRef, ToolbarProps>((props, ref) => (\n  <Primitive.Root\n    {...props}\n    ref={ref}\n    className={cn(\n      'flex-row flex-wrap items-center gap-[4px] rounded-lg border border-border bg-card p-[4px]',\n      props.className,\n    )}\n  />\n))\nToolbar.displayName = 'Toolbar'\nexport type ToolbarButtonProps = Omit<Primitive.ButtonProps, 'children'> & {\n  children?: React.ReactNode\n  className?: string\n}\nexport const ToolbarButton = React.forwardRef<Primitive.ButtonRef, ToolbarButtonProps>(\n  ({ children, className, ...props }, ref) => (\n    <Primitive.Button\n      {...props}\n      ref={ref}\n      className={cn(\n        'min-h-[48px] min-w-[48px] flex-row items-center justify-center gap-[8px] rounded-md px-[12px] py-[10px]',\n        props.disabled && 'opacity-50',\n        className,\n      )}\n    >\n      {renderTextChildren(children, 'font-medium')}\n    </Primitive.Button>\n  ),\n)\nToolbarButton.displayName = 'ToolbarButton'\nexport type ToolbarLinkProps = Omit<Primitive.LinkProps, 'children'> & {\n  children?: React.ReactNode\n  className?: string\n}\nexport const ToolbarLink = React.forwardRef<Primitive.LinkRef, ToolbarLinkProps>(\n  ({ children, className, ...props }, ref) => (\n    <Primitive.Link\n      {...props}\n      ref={ref}\n      className={cn(\n        'min-h-[48px] min-w-[48px] flex-row items-center justify-center gap-[8px] rounded-md px-[12px] py-[10px]',\n        className,\n      )}\n    >\n      {renderTextChildren(children, 'underline')}\n    </Primitive.Link>\n  ),\n)\nToolbarLink.displayName = 'ToolbarLink'\nexport type ToolbarSeparatorProps = Primitive.SeparatorProps & { className?: string }\nexport const ToolbarSeparator = React.forwardRef<Primitive.SeparatorRef, ToolbarSeparatorProps>((props, ref) => (\n  <Primitive.Separator\n    {...props}\n    ref={ref}\n    className={cn('mx-[4px] my-[8px] w-px self-stretch bg-border', props.className)}\n  />\n))\nToolbarSeparator.displayName = 'ToolbarSeparator'\n\nconst ToggleContext = React.createContext<string | string[] | undefined>(undefined)\nexport type ToolbarToggleGroupProps = Primitive.ToggleGroupProps & { className?: string }\nexport const ToolbarToggleGroup = React.forwardRef<Primitive.ToggleGroupRef, ToolbarToggleGroupProps>((props, ref) => (\n  <ToggleContext.Provider value={props.value}>\n    <Primitive.ToggleGroup {...props} ref={ref} className={cn('flex-row flex-wrap gap-[4px]', props.className)} />\n  </ToggleContext.Provider>\n))\nToolbarToggleGroup.displayName = 'ToolbarToggleGroup'\nexport type ToolbarToggleItemProps = Omit<Primitive.ToggleItemProps, 'children'> & {\n  children?: React.ReactNode\n  className?: string\n}\nexport const ToolbarToggleItem = React.forwardRef<Primitive.ToggleItemRef, ToolbarToggleItemProps>(\n  ({ children, className, ...props }, ref) => {\n    const value = React.useContext(ToggleContext)\n    const selected = Array.isArray(value) ? value.includes(props.value) : value === props.value\n    return (\n      <Primitive.ToggleItem\n        {...props}\n        ref={ref}\n        className={cn(\n          'min-h-[48px] min-w-[48px] items-center justify-center rounded-md px-[12px] py-[10px]',\n          selected && 'bg-secondary',\n          props.disabled && 'opacity-50',\n          className,\n        )}\n      >\n        {renderTextChildren(children, 'font-medium')}\n      </Primitive.ToggleItem>\n    )\n  },\n)\nToolbarToggleItem.displayName = 'ToolbarToggleItem'\n\n// The published headless components forward className outside the NativeWind JSX transform.\ncssInterop(Primitive.Root, { className: 'style' })\ncssInterop(Primitive.Button, { className: 'style' })\ncssInterop(Primitive.Link, { className: 'style' })\ncssInterop(Primitive.Separator, { className: 'style' })\ncssInterop(Primitive.ToggleGroup, { className: 'style' })\ncssInterop(Primitive.ToggleItem, { className: 'style' })\n",
      "type": "registry:ui",
      "target": "~/components/ui/toolbar/Toolbar.tsx"
    },
    {
      "path": "packages/registry-native/components/toolbar/index.ts",
      "content": "export * from './Toolbar'\n",
      "type": "registry:ui",
      "target": "~/components/ui/toolbar/index.ts"
    }
  ],
  "dependencies": [
    "react-native-css-interop",
    "@rn-primitives/toolbar"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/label-children.json"
  ],
  "description": "Touch-sized action toolbar with links, separators and toggle groups.",
  "categories": [
    "layout"
  ]
}