import React, { FC } from 'react'
import "./styles.scss";
import { labelProps } from './types';
import cx from 'classnames';
import { useLocale } from '../../hooks/useLocale';

export const Label: FC<labelProps> = ({children, title=false, subTitle=false, className, htmlFor, ...props }) => {
  const label = useLocale(children)
  return (
    <label className={cx("label-gtc-rc",title && 'title-gtc-rc', subTitle && 'subTitle-gtc-rc', className)} htmlFor={htmlFor} {...props}>
        {label}
    </label>
  )
}

