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

import { twJoin } from '@/utils'

export const rootStyles = cva(
	twJoin({
		text: 'text-gray-800',
		//
		dark: 'dark:text-dark-gray-300'
	}),
	{
		variants: {
			size: {
				'2xs': 'text-2xs',
				xs: 'text-xs',
				sm: 'text-sm',
				md: 'text-base',
				lg: 'text-lg'
			},
			strong: {
				true: 'font-semibold'
			},
			muted: {
				true: 'text-gray! dark:text-dark-gray-600!'
			},
			accent: {
				true: 'text-gray-900! dark:text-dark-gray-200!'
			}
		},
		defaultVariants: {
			size: 'md',
			strong: false,
			muted: false,
			accent: false
		}
	}
)

export type RootStylesProps = VariantProps<typeof rootStyles>
