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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <g>
              <circle cx="128" cy="120" r="44" />
              <path d="M208,32H48A16.01833,16.01833,0,0,0,32,48V208a16.01833,16.01833,0,0,0,16,16H208a16.01833,16.01833,0,0,0,16-16V48A16.01833,16.01833,0,0,0,208,32Zm0,176h-3.67322a80.44452,80.44452,0,0,0-26.069-38.24561,79.23073,79.23073,0,0,0-8.98218-6.26953,59.83684,59.83684,0,0,1-82.55126,0,79.23073,79.23073,0,0,0-8.98218,6.26953A80.44452,80.44452,0,0,0,51.67322,208H48V48H208l.01025,159.99951Z" />
            </g>
          </>
        )
        break

      default:
        path = () => (
          <>
            <circle
              cx="128"
              cy="120"
              r="40"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <rect
              x="40"
              y="40"
              width="176"
              height="176"
              rx="8"
              strokeWidth="18"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              fill="none"
            />
            <path
              d="M57.78418,215.99979a72.02025,72.02025,0,0,1,140.43164,0"
              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} />
  }
)
