import type { DetailedHTMLProps, FC, TextareaHTMLAttributes } from 'react'
import type { MergeOmitting } from '@/types/helpers'
import '@/components/ui/textarea.css'

export type TextareaProps = MergeOmitting<
  DetailedHTMLProps<
    TextareaHTMLAttributes<HTMLTextAreaElement>,
    HTMLTextAreaElement
  >,
  {
    className?: string
  }
>

const Textarea: FC<TextareaProps> = ({ className, ...textareaProps }) => {
  return (
    <textarea
      className={`st-rnd-textarea${className ? ` ${className}` : ''}`}
      {...textareaProps}
    />
  )
}

export default Textarea
