import type * as React from 'react';
import { t } from '../i18n';
import { SvgIcon, IconCommonProps } from './SvgIcon';

const defaultProps = {
  className: '',
  viewBox: '0 0 32 32',
};

export function EmailIcon(props: IconCommonProps): React.ReactElement {
  const iconCssClasses = `ds-c-icon--email ${props.className || ''}`;

  return (
    <SvgIcon title={t('icons.email')} {...defaultProps} {...props} className={iconCssClasses}>
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M19.965 17.8852C18.8411 18.7538 17.2016 20.0207 16 20C14.7984 20.0207 13.1589 18.7538 12.035 17.8852C11.8026 17.7056 11.5924 17.5431 11.4125 17.4125C3.72556 11.8341 2.62089 10.9696 0.97771 9.68369C0.847996 9.58218 0.714928 9.47804 0.575 9.36875C0.2125 9.08125 0 8.65 0 8.1875V7C0 5.34375 1.34375 4 3 4H29C30.6562 4 32 5.34375 32 7V8.1875C32 8.65 31.7875 9.0875 31.425 9.36875C31.3178 9.45286 31.2146 9.5339 31.1138 9.61301C29.4176 10.9449 28.4162 11.7312 20.5875 17.4125C20.4076 17.5431 20.1974 17.7056 19.965 17.8852ZM32 12.2188C32 11.9125 31.6375 11.7313 31.3937 11.925C29.9937 13.0125 28.1437 14.4 21.7687 19.0312C21.5754 19.1722 21.3587 19.3398 21.1225 19.5225C19.8092 20.5384 17.8911 22.0221 16 22.0063C14.1176 22.0169 12.2307 20.5609 10.8966 19.5315C10.6582 19.3475 10.4374 19.1772 10.2375 19.0312C3.8625 14.4 2.00625 13.0188 0.60625 11.9313C0.35625 11.7375 0 11.9125 0 12.225V25C0 26.6562 1.34375 28 3 28H29C30.6562 28 32 26.6562 32 25V12.2188Z"
      />
    </SvgIcon>
  );
}
