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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M230.24694,163.00293A8,8,0,0,1,223.99988,176H48v40a8,8,0,1,1-16,0V48a8.00039,8.00039,0,0,1,8-8H223.99988a8,8,0,0,1,6.24706,12.99707L186.245,108Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <polyline
              points="40 216 40 48 40 48 224 48 176 108 224 168 40 168"
              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} />
  }
)
