{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-group",
  "type": "registry:ui",
  "dependencies": [
    "@kobalte/core"
  ],
  "registryDependencies": [
    "@gc-solid/button",
    "@gc-solid/separator"
  ],
  "files": [
    {
      "path": "ui/button-group.tsx",
      "content": "import {\n  type Component,\n  type ComponentProps,\n  mergeProps,\n  splitProps,\n  type ValidComponent\n} from \"solid-js\"\n\nimport { Polymorphic, type PolymorphicProps } from \"@kobalte/core\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\nconst buttonGroupVariants = cva(\n  \"cn-button-group flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n  {\n    variants: {\n      orientation: {\n        horizontal:\n          \"cn-button-group-orientation-horizontal [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n        vertical:\n          \"cn-button-group-orientation-vertical flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\"\n      }\n    },\n    defaultVariants: {\n      orientation: \"horizontal\"\n    }\n  }\n)\n\ntype ButtonGroupProps = ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>\n\nconst ButtonGroup: Component<ButtonGroupProps> = (props) => {\n  const [local, others] = splitProps(props, [\"class\", \"orientation\"])\n  return (\n    <div\n      class={cn(buttonGroupVariants({ orientation: local.orientation }), local.class)}\n      data-orientation={local.orientation}\n      data-slot=\"button-group\"\n      role=\"group\"\n      {...others}\n    />\n  )\n}\n\nconst ButtonGroupText = <T extends ValidComponent = \"div\">(\n  props: PolymorphicProps<T, ComponentProps<\"div\">>\n) => {\n  const [local, others] = splitProps(props, [\"class\"])\n  return (\n    <Polymorphic\n      class={cn(\"cn-button-group-text flex items-center [&_svg]:pointer-events-none\", local.class)}\n      {...others}\n    />\n  )\n}\n\ntype ButtonGroupSeparatorProps = ComponentProps<typeof Separator>\n\nconst ButtonGroupSeparator: Component<ButtonGroupSeparatorProps> = (rawProps) => {\n  const props = mergeProps({ orientation: \"vertical\" } as const, rawProps)\n  const [local, others] = splitProps(props, [\"class\", \"orientation\"])\n  return (\n    <Separator\n      class={cn(\n        \"cn-button-group-separator relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto data-[orientation=horizontal]:w-auto\",\n        local.class\n      )}\n      data-slot=\"button-group-separator\"\n      orientation={local.orientation}\n      {...others}\n    />\n  )\n}\n\nexport { ButtonGroup, ButtonGroupText, ButtonGroupSeparator, buttonGroupVariants }\n",
      "type": "registry:ui"
    }
  ]
}