import { FC } from 'react';

import HuDialog from '@material-hu/components/design-system/Dialog';
import { useLokaliseTranslation } from 'src/utils/i18n';

type LimitPinnedConversationsProps = {
  onClose: () => void;
};

const LimitPinnedConversations: FC<LimitPinnedConversationsProps> = props => {
  const { onClose } = props;
  const { t } = useLokaliseTranslation('chat');

  return (
    <HuDialog
      title={t('pin.limit_reached')}
      primaryButtonProps={{
        children: t('general:understood'),
        onClick: onClose,
      }}
      onClose={onClose}
    />
  );
};

export default LimitPinnedConversations;
