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

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

export function AlertIcon(props: IconCommonProps): React.ReactElement {
  const iconCssClasses = `ds-c-icon--alert ${props.className || ''}`;
  return (
    <SvgIcon title={t('icons.alertCircle')} {...defaultProps} {...props} className={iconCssClasses}>
      <path d="M4.25008 15.9846C4.25008 16.1305 4.20291 16.2527 4.10932 16.3517C4.01573 16.4506 3.90104 16.4999 3.76545 16.4999H0.765403C0.630004 16.4999 0.510141 16.4479 0.406003 16.3438C0.301865 16.2397 0.249892 16.1198 0.249892 15.9846V13.016C0.249892 12.8806 0.301865 12.7607 0.406003 12.6566C0.510141 12.5525 0.630004 12.5005 0.765403 12.5005H3.76545C3.90104 12.5005 4.01592 12.55 4.10932 12.6487C4.20291 12.7481 4.25008 12.87 4.25008 13.016V15.9846ZM4.21863 10.6097C4.20808 10.7138 4.15362 10.8051 4.05485 10.8832C3.9557 10.9612 3.83353 11.0002 3.68778 11.0002H0.797047C0.6511 11.0002 0.526058 10.9612 0.421921 10.8832C0.317783 10.8051 0.265618 10.7138 0.265618 10.6097L0 0.906485C0 0.781252 0.051973 0.687662 0.156111 0.625141C0.26044 0.541908 0.385482 0.500099 0.531237 0.500099H3.96912C4.11507 0.500099 4.23992 0.541716 4.34406 0.625141C4.44819 0.687662 4.49998 0.781444 4.49998 0.906485L4.21863 10.6097Z" />
    </SvgIcon>
  );
}
