{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle-group",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "@coss/separator",
    "@coss/toggle"
  ],
  "files": [
    {
      "path": "registry/default/ui/toggle-group.tsx",
      "content": "\"use client\";\n\nimport type { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\";\nimport { ToggleGroup as ToggleGroupPrimitive } from \"@base-ui/react/toggle-group\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\nimport { Separator } from \"@/registry/default/ui/separator\";\nimport {\n  Toggle as ToggleComponent,\n  type toggleVariants,\n} from \"@/registry/default/ui/toggle\";\n\nexport const ToggleGroupContext: React.Context<\n  VariantProps<typeof toggleVariants>\n> = React.createContext<VariantProps<typeof toggleVariants>>({\n  size: \"default\",\n  variant: \"default\",\n});\n\nexport function ToggleGroup({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  orientation = \"horizontal\",\n  children,\n  ...props\n}: ToggleGroupPrimitive.Props &\n  VariantProps<typeof toggleVariants>): React.ReactElement {\n  return (\n    <ToggleGroupPrimitive\n      className={cn(\n        \"flex w-fit *:focus-visible:z-10 dark:*:[[data-slot=separator]:has(+[data-slot=toggle]:hover)]:before:bg-input/64 dark:*:[[data-slot=separator]:has(+[data-slot=toggle][data-pressed])]:before:bg-input dark:*:[[data-slot=toggle]:hover+[data-slot=separator]]:before:bg-input/64 dark:*:[[data-slot=toggle][data-pressed]+[data-slot=separator]]:before:bg-input\",\n        orientation === \"horizontal\"\n          ? \"*:pointer-coarse:after:min-w-auto\"\n          : \"*:pointer-coarse:after:min-h-auto\",\n        variant === \"default\"\n          ? \"gap-0.5\"\n          : orientation === \"horizontal\"\n            ? \"*:not-first:rounded-s-none *:not-last:rounded-e-none *:not-first:border-s-0 *:not-last:border-e-0 *:not-first:not-data-[slot=separator]:before:-start-[0.5px] *:not-last:not-data-[slot=separator]:before:-end-[0.5px] *:not-first:before:rounded-s-none *:not-last:before:rounded-e-none\"\n            : \"flex-col *:not-first:rounded-t-none *:not-last:rounded-b-none *:not-first:border-t-0 *:not-last:border-b-0 *:not-first:not-data-[slot=separator]:before:-top-[0.5px] *:not-last:not-data-[slot=separator]:before:-bottom-[0.5px] *:not-first:before:rounded-t-none *:not-last:before:rounded-b-none *:data-[slot=toggle]:not-last:before:hidden dark:*:last:before:hidden dark:*:first:before:block\",\n        className,\n      )}\n      data-size={size}\n      data-slot=\"toggle-group\"\n      data-variant={variant}\n      orientation={orientation}\n      {...props}\n    >\n      <ToggleGroupContext.Provider value={{ size, variant }}>\n        {children}\n      </ToggleGroupContext.Provider>\n    </ToggleGroupPrimitive>\n  );\n}\n\nexport function ToggleGroupItem({\n  className,\n  children,\n  variant,\n  size,\n  ...props\n}: TogglePrimitive.Props &\n  VariantProps<typeof toggleVariants>): React.ReactElement {\n  const context = React.useContext(ToggleGroupContext);\n\n  const resolvedVariant = context.variant || variant;\n  const resolvedSize = context.size || size;\n\n  return (\n    <ToggleComponent\n      className={className}\n      data-size={resolvedSize}\n      data-variant={resolvedVariant}\n      size={resolvedSize}\n      variant={resolvedVariant}\n      {...props}\n    >\n      {children}\n    </ToggleComponent>\n  );\n}\n\nexport function ToggleGroupSeparator({\n  className,\n  orientation = \"vertical\",\n  ...props\n}: {\n  className?: string;\n} & React.ComponentProps<typeof Separator>): React.ReactElement {\n  return (\n    <Separator\n      className={cn(\n        \"pointer-events-none relative bg-input before:absolute before:inset-0 dark:before:bg-input/32\",\n        className,\n      )}\n      orientation={orientation}\n      {...props}\n    />\n  );\n}\n\nexport { ToggleGroupPrimitive };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}