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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path d="M208,48H48A24.0275,24.0275,0,0,0,24,72V184a24.0275,24.0275,0,0,0,24,24H208a24.0275,24.0275,0,0,0,24-24V72A24.0275,24.0275,0,0,0,208,48Zm-56.47949,76.80762a24.00866,24.00866,0,0,1-47.041.001A16.03939,16.03939,0,0,0,88.80957,112H40V96H216v16H167.19043A16.0395,16.0395,0,0,0,151.52051,124.80762ZM48,64H208a8.00917,8.00917,0,0,1,8,8v8H40V72A8.00917,8.00917,0,0,1,48,64Z" />
          </>
        )
        break

      default:
        path = () => (
          <>
            <rect
              x="32"
              y="56"
              width="192"
              height="144"
              rx="16"
              strokeWidth="18"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              fill="none"
            />
            <path
              d="M32,120H88.80976A7.98836,7.98836,0,0,1,96.64,126.39917a32.00785,32.00785,0,0,0,62.7201,0A7.98836,7.98836,0,0,1,167.19024,120H224"
              fill="none"
              stroke="currentColor"
              strokeLinecap="round"
              strokeLinejoin="round"
              strokeWidth="18"
            />
            <line
              x1="32"
              y1="88"
              x2="224"
              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} />
  }
)
