{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle-group",
  "title": "Toggle Group",
  "description": "Toggles joined the way the segmented tabs are.",
  "dependencies": [
    "@base-ui/react",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@afterglow/toggle"
  ],
  "files": [
    {
      "path": "registry/terminal/ui/toggle-group.tsx",
      "content": "\"use client\";\n\nimport { 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 { createContext, use } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { toggleVariants } from \"@/registry/terminal/ui/toggle\";\n\nconst ToggleGroupContext = createContext<VariantProps<typeof toggleVariants>>({\n  size: \"default\",\n  variant: \"default\",\n});\n\nfunction ToggleGroup({\n  className,\n  variant,\n  size,\n  children,\n  ...props\n}: ToggleGroupPrimitive.Props & VariantProps<typeof toggleVariants>) {\n  return (\n    <ToggleGroupPrimitive\n      className={cn(\n        \"group/toggle-group flex w-fit items-center gap-px rounded-none bg-line p-px\",\n        className\n      )}\n      data-size={size}\n      data-slot=\"toggle-group\"\n      data-variant={variant}\n      {...props}\n    >\n      <ToggleGroupContext value={{ size, variant }}>\n        {children}\n      </ToggleGroupContext>\n    </ToggleGroupPrimitive>\n  );\n}\n\nfunction ToggleGroupItem({\n  className,\n  children,\n  variant,\n  size,\n  ...props\n}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {\n  const context = use(ToggleGroupContext);\n\n  return (\n    <TogglePrimitive\n      className={cn(\n        toggleVariants({\n          size: context.size || size,\n          variant: context.variant || variant,\n        }),\n        \"min-w-0 shrink-0 border-0 bg-secondary px-3 focus-visible:z-10 focus-visible:outline-offset-[-2px]\",\n        className\n      )}\n      data-slot=\"toggle-group-item\"\n      {...props}\n    >\n      {children}\n    </TogglePrimitive>\n  );\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}