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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M232,76.68652,179.31348,23.999A16.02162,16.02162,0,0,0,156.68555,24L132,48.686l37.65723,37.65722a8.00018,8.00018,0,0,1-11.31446,11.31348L120.686,60,96,84.686l37.65723,37.65722a8.00018,8.00018,0,0,1-11.31446,11.31348L84.686,96,60,120.686l37.65723,37.65722a8.00018,8.00018,0,0,1-11.31446,11.31348L48.686,132,24.001,156.68555A15.99888,15.99888,0,0,0,24,179.31348L76.68652,232.001A16.02252,16.02252,0,0,0,99.31445,232L232,99.31348a15.9989,15.9989,0,0,0,0-22.627Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <rect
              x="26.17662"
              y="82.74517"
              width="203.64675"
              height="90.50967"
              rx="8"
              transform="translate(-53.01934 128) rotate(-45)"
              strokeWidth="18"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              fill="none"
            />
            <line
              x1="132"
              y1="60"
              x2="164"
              y2="92"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="96"
              y1="96"
              x2="128"
              y2="128"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="60"
              y1="132"
              x2="92"
              y2="164"
              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} />
  }
)
