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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <g>
              <circle cx="99.99951" cy="92" r="12" />
              <path d="M208.00049,31.99963h-160a16.01833,16.01833,0,0,0-16,16V175.97369l-.001.0307.001,31.99524a16.01833,16.01833,0,0,0,16,16h160a16.01833,16.01833,0,0,0,16-16v-160A16.01834,16.01834,0,0,0,208.00049,31.99963Zm-28.68653,80a16.019,16.019,0,0,0-22.62792,0l-44.68555,44.68653L91.314,135.99963a16.02161,16.02161,0,0,0-22.62792,0L48.00049,156.68457V47.99963h160l.00586,92.6922Z" />
            </g>
          </>
        )
        break

      default:
        path = () => (
          <>
            <rect
              x="40"
              y="40"
              width="176"
              height="176"
              rx="8"
              strokeWidth="18"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              fill="none"
            />
            <path
              d="M215.99982,159.99982l-42.343-42.343a8,8,0,0,0-11.3137,0l-44.6863,44.6863a8,8,0,0,1-11.3137,0l-20.6863-20.6863a8,8,0,0,0-11.3137,0L40,176"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <circle cx="100" cy="92" 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} />
  }
)
