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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path
              d="M16.0001 120.742C16.0001 108.012 21.0572 95.8031 30.059 86.8014C39.0607 77.7996 51.2697 72.7425 64.0001 72.7425H104C104.5 72.7425 156.4 72.0425 205.7 30.6425C208.037 28.6703 210.893 27.4137 213.926 27.0235C216.959 26.6333 220.04 27.126 222.8 28.4425C225.576 29.7048 227.924 31.7482 229.558 34.3232C231.192 36.8982 232.041 39.8932 232 42.9425V198.542C232.041 201.592 231.192 204.587 229.558 207.162C227.924 209.737 225.576 211.78 222.8 213.042C220.667 214.023 218.348 214.535 216 214.542C212.237 214.567 208.587 213.256 205.7 210.842C167.8 179.042 128.5 171.242 112 169.342V204.442C112.01 207.074 111.366 209.666 110.127 211.988C108.888 214.309 107.092 216.286 104.9 217.742L93.9001 225.142C91.7342 226.513 89.2835 227.369 86.7356 227.647C84.1877 227.924 81.6101 227.615 79.2001 226.742C76.8073 225.813 74.6752 224.318 72.986 222.385C71.2968 220.452 70.1008 218.138 69.5001 215.642L57.6001 168.342C46.0945 166.752 35.5501 161.061 27.9068 152.315C20.2635 143.569 16.0353 132.357 16.0001 120.742V120.742ZM85.0001 211.742L96.0001 204.442V168.742H74.2001L85.0001 211.742ZM64.0001 152.742H96.0001V88.7425H64.0001C55.5132 88.7425 47.3738 92.1139 41.3727 98.1151C35.3715 104.116 32.0001 112.256 32.0001 120.742C32.0001 129.229 35.3715 137.369 41.3727 143.37C47.3738 149.371 55.5132 152.742 64.0001 152.742Z"
              fill="currentColor"
            />
          </>
        )
        break

      default:
        path = () => (
          <>
            <path
              d="M104 80.7434V204.443C104.012 205.773 103.688 207.084 103.059 208.255C102.43 209.426 101.515 210.42 100.4 211.143L89.3997 218.443C88.334 219.155 87.1131 219.6 85.8396 219.741C84.5661 219.883 83.2773 219.716 82.0816 219.255C80.8859 218.795 79.8184 218.054 78.9688 217.094C78.1193 216.135 77.5125 214.986 77.1997 213.743L63.9997 160.743"
              fill="none"
              stroke="currentColor"
              strokeWidth="18"
              strokeLinecap="round"
              strokeLinejoin="round"
            />
            <path
              d="M64 160.744C53.3913 160.744 43.2172 156.529 35.7157 149.028C28.2143 141.527 24 131.352 24 120.744C24 110.135 28.2143 99.9609 35.7157 92.4594C43.2172 84.958 53.3913 80.7437 64 80.7437H104C104 80.7437 158.5 80.7437 210.9 36.8437C212.065 35.8792 213.481 35.265 214.981 35.0723C216.482 34.8795 218.006 35.1162 219.377 35.7548C220.749 36.3934 221.911 37.4077 222.729 38.6802C223.547 39.9526 223.988 41.4309 224 42.9437V198.544C223.988 200.056 223.547 201.535 222.729 202.807C221.911 204.08 220.749 205.094 219.377 205.733C218.006 206.371 216.482 206.608 214.981 206.415C213.481 206.222 212.065 205.608 210.9 204.644C158.5 160.744 104 160.744 104 160.744H64Z"
              fill="none"
              stroke="currentColor"
              strokeWidth="18"
              strokeLinecap="round"
              strokeLinejoin="round"
            />
          </>
        )
        break
    }

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

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

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