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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M223.99414,208V48a16.01582,16.01582,0,0,0-16-16h-160a16.01583,16.01583,0,0,0-16,16V208a16.01583,16.01583,0,0,0,16,16h160A16.01582,16.01582,0,0,0,223.99414,208Zm-56.39062-80.40625a7.99708,7.99708,0,0,1-11.3125,0l-20.29688-20.28613V168a8,8,0,1,1-16,0V107.3125L99.71289,127.59375a7.99915,7.99915,0,0,1-11.3125-11.3125l33.92773-33.92773a8.02367,8.02367,0,0,1,11.332,0l33.94336,33.92773A7.99708,7.99708,0,0,1,167.60352,127.59375Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <rect
              x="40"
              y="40"
              width="176"
              height="176"
              rx="8"
              strokeWidth="18"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              fill="none"
            />
            <polyline
              points="94.059 121.941 128 88 161.941 121.941"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="128"
              y1="168"
              x2="128"
              y2="88"
              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} />
  }
)
