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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M230.62744,49.37207a32.03673,32.03673,0,0,0-45.25488,0l-.00049.001a31.9114,31.9114,0,0,0-5.15478,6.75781l-28.24256-7.70215A31.978,31.978,0,0,0,97.37256,25.37207l-.00049.001a32.056,32.056,0,0,0-5.75415,37.4082L57.68018,93.3252a32.05378,32.05378,0,0,0-40.30762,4.04687l-.00049.001a32.00105,32.00105,0,0,0,42.88257,47.40039l70.03247,51.35791A32.00685,32.00685,0,1,0,177.855,181.44727l27.38355-77.58692c.91882.07861,1.84.124,2.76147.124a31.98463,31.98463,0,0,0,22.62744-54.61231Zm-67.866,126.7666a31.96846,31.96846,0,0,0-23.0166,7.0874l-70.032-51.35742a32.15784,32.15784,0,0,0-1.33081-26.6499L102.31982,74.6748a31.98394,31.98394,0,0,0,45.46289-10.80566l28.24256,7.70215a31.91307,31.91307,0,0,0,14.11951,26.98144Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <circle
              cx="120"
              cy="48"
              r="24"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <circle
              cx="40"
              cy="120"
              r="24"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <circle
              cx="160"
              cy="208"
              r="24"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <circle
              cx="208"
              cy="72"
              r="24"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="184.84844"
              y1="65.68594"
              x2="143.15155"
              y2="54.31406"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="102.16099"
              y1="64.05511"
              x2="57.83902"
              y2="103.94489"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="59.35636"
              y1="134.19466"
              x2="140.64365"
              y2="193.80534"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="167.98938"
              y1="185.36342"
              x2="200.01089"
              y2="94.6358"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
          </>
        )
        break
    }

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

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

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