'use client'; import type { VariantProps } from 'class-variance-authority'; import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group'; import * as React from 'react'; import { toggleVariants } from '@/components/ui/toggle'; import { cn } from '@/lib/utils'; const ToggleGroupContext = React.createContext< VariantProps >({ size: 'default', variant: 'default', }); const ToggleGroup = ({ ref, className, variant, size, children, ...props }: React.ComponentPropsWithoutRef & VariantProps & { ref?: React.RefObject | null> }) => ( {children} ); ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName; const ToggleGroupItem = ({ ref, className, children, variant, size, ...props }: React.ComponentPropsWithoutRef & VariantProps & { ref?: React.RefObject | null> }) => { const context = React.use(ToggleGroupContext); return ( {children} ); }; ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName; export { ToggleGroup, ToggleGroupItem };