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

import { twJoin } from '@/utils'

export const rootStyles = cva(
	twJoin({
		display: 'flex gap-x-2.5 w-full py-3 px-4',
		visual: 'rounded-md shadow-lg border'
	}),
	{
		variants: {
			type: {
				default: '',
				success: 'bg-success-100 border-success',
				info: 'bg-info-100 border-info',
				warning: 'bg-warning-100 border-warning',
				error: 'bg-danger-100 border-danger',
				loading: 'bg-secondary-100 border-secondary'
			}
		},
		defaultVariants: {
			type: 'default'
		}
	}
)

export type RootStylesProps = VariantProps<typeof rootStyles>

// /////////////////////////

export const iconStyles = twJoin({
	display: 'size-6.5 p-1',
	visual: 'bg-white rounded-md',
	childs: '[&_svg]:size-4.5'
})
