import { type FC } from 'react';

import HuAlert from '@material-hu/components/design-system/Alert';

import { type User } from 'src/types/user';
import { useLokaliseTranslation } from 'src/utils/i18n';
import { getFullName } from 'src/utils/userUtils';

type Props = {
  user: User;
};

export const RequestAlertCreator: FC<Props> = ({ user }: Props) => {
  const { t } = useLokaliseTranslation('time_off');
  return (
    <HuAlert
      severity="info"
      hasClose
      title={t('REQUEST_CREATED_BY', { name: getFullName(user) })}
    />
  );
};

export default RequestAlertCreator;
