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

import { twJoin } from '@/utils'

export const rootStyles = cva(
	twJoin({
		tw: [
			'group-[.form-horizontal]/form-item:flex-row',
			'group-[.form-vertical]/form-item:flex-col'
		],
		display: 'flex gap-1'
	}),
	{
		variants: {
			layout: {
				horizontal: 'flex-row!',
				vertical: 'flex-col!'
			}
		}
	}
)

export type RootStylesProps = VariantProps<typeof rootStyles>
