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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M240,112H229.199L201.42188,49.501A16.01649,16.01649,0,0,0,186.80078,40H69.19922a16.0158,16.0158,0,0,0-14.6211,9.502L26.801,112H16a8,8,0,0,0,0,16h8v80a16.01833,16.01833,0,0,0,16,16H64a16.01833,16.01833,0,0,0,16-16V192h96v16a16.01833,16.01833,0,0,0,16,16h24a16.01833,16.01833,0,0,0,16-16V128h8a8,8,0,0,0,0-16ZM80,160H64a8,8,0,0,1,0-16H80a8,8,0,0,1,0,16Zm96,0a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <line
              x1="16"
              y1="120"
              x2="240"
              y2="120"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <path
              d="M224,184v24a8,8,0,0,1-8,8H192a8,8,0,0,1-8-8V184"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <path
              d="M72,184v24a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V184"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="64"
              y1="152"
              x2="80"
              y2="152"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="176"
              y1="152"
              x2="192"
              y2="152"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <path
              d="M224,120,194.11151,52.75089A8,8,0,0,0,186.801,48H69.199a8,8,0,0,0-7.31049,4.75089L32,120v64H224Z"
              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} />
  }
)
