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

import { twJoin } from '@/utils'

export const rootStyles = cva(
	twJoin({
		display: 'inline-flex items-center gap-x-1',
		text: 'text-primary leading-none',
		animation: 'transition-color',
		hover: 'hover:text-primary-400'
	}),
	{
		variants: {
			size: {
				md: 'text-base',
				sm: 'text-sm'
			},
			disabled: {
				true: twJoin({
					mouse: 'select-none pointer-events-none',
					visual: 'opacity-50'
				})
			}
		},
		defaultVariants: {
			size: 'md',
			disabled: false
		}
	}
)

export type RootStylesProps = VariantProps<typeof rootStyles>
