/* GENERATED FILE */
import React, { forwardRef } from 'react'

import type {
  IconWeight,
  IconProps,
  PaintFunction,
  Icon,
  RenderFunction,
} from '../lib'
import { renderPathForWeight, useIconContext, IconBase } from '../lib'

export const IconWarning: Icon = forwardRef<SVGSVGElement, IconProps>(
  (props, ref) => {
    let path: PaintFunction

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M236.74414,187.96585l-87.96875-152a24.012,24.012,0,0,0-41.54687,0v.00782L19.25977,187.96585a23.9982,23.9982,0,0,0,20.76562,36.02344H215.97852a23.9982,23.9982,0,0,0,20.76562-36.02344Zm-116.75-83.96875a8,8,0,1,1,16,0v40a8,8,0,1,1-16,0ZM128,192a12,12,0,1,1,12-12A12.00059,12.00059,0,0,1,128,192Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <line
              x1="128"
              y1="104"
              x2="128"
              y2="144"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <path
              d="M114.15243,39.98472,26.17616,191.977a16.00005,16.00005,0,0,0,13.84762,24.01535H215.97625A16,16,0,0,0,229.82386,191.977L141.84757,39.98472A16,16,0,0,0,114.15243,39.98472Z"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <circle cx="128" cy="180" r="12" />
          </>
        )
        break
    }

    const renderPath: RenderFunction = (weight: IconWeight) =>
      renderPathForWeight(weight, path)

    const { useIconProps } = useIconContext()
    const parsedProps = useIconProps(props)

    return <IconBase ref={ref} {...parsedProps} renderPath={renderPath} />
  }
)
