import { cva, type VariantProps } from 'class-variance-authority'

import { twJoin } from '@/utils'

export const rootStyles = cva(
	twJoin({
		tw: [
			'group/label',
			'has-[[role="checkbox"]]:hover:cursor-pointer',
			'has-[[role="switch"]]:hover:cursor-pointer',
			'has-[[role="radio"]]:hover:cursor-pointer'
		],
		display: 'flex items-center gap-1.5',
		text: 'leading-none text-nowrap'
	}),
	{
		variants: {
			size: {
				md: 'text-sm text-gray-900 dark:text-dark-gray-200',
				lg: 'mb-0.5 text-base font-semibold text-gray-800 dark:text-dark-gray-300'
			}
		},
		defaultVariants: {
			size: 'md'
		}
	}
)

export type RootStylesProps = VariantProps<typeof rootStyles>
