import { type ComponentProps } from 'react'

import { RootStylesProps, rootStyles } from './Text.styles'

type TextProps = ComponentProps<'span'> & RootStylesProps

function Text({
	strong = false,
	muted = false,
	accent = false,
	size,
	className,
	...props
}: TextProps) {
	const Comp = strong ? 'strong' : 'span'

	return (
		<Comp
			className={rootStyles({ strong, muted, accent, size, className })}
			{...props}
		/>
	)
}

export { Text }
