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

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

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

  switch (props.weight) {
    case 'fill':
      path = () => (
        <>
          <path d="M216,96H176V56a7.99977,7.99977,0,0,0-8-8H48V40a8,8,0,0,0-16,0V216a8,8,0,0,0,16,0v-8h88a7.99977,7.99977,0,0,0,8-8V160h72a7.99977,7.99977,0,0,0,8-8V104A7.99977,7.99977,0,0,0,216,96ZM160,64V96H48V64ZM128,192H48V160h80Z" />
        </>
      )
      break

    default:
      path = () => (
        <>
          <line
            x1="40"
            y1="216"
            x2="40"
            y2="40"
            fill="none"
            stroke="currentColor"
            strokeLinecap="round"
            strokeLinejoin="round"
            strokeWidth="18"
          />
          <polyline
            points="40 56 168 56 168 104"
            fill="none"
            stroke="currentColor"
            strokeLinecap="round"
            strokeLinejoin="round"
            strokeWidth="18"
          />
          <rect
            x="40"
            y="104"
            width="176"
            height="48"
            strokeWidth="18"
            stroke="currentColor"
            strokeLinecap="round"
            strokeLinejoin="round"
            fill="none"
          />
          <polyline
            points="136 152 136 200 40 200"
            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} />
})
