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

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

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

    switch (props.weight) {
      case 'fill':
        path = () => (
          <>
            <path
              fillRule="evenodd"
              clipRule="evenodd"
              d="M175.766 28.6875L227.312 80.2344C230.303 83.2416 231.987 87.3064 232 91.5472V164.453C231.987 168.694 230.303 172.758 227.312 175.766L175.766 227.313C172.759 230.302 168.694 231.987 164.453 232H91.5466C87.3058 231.987 83.2418 230.302 80.2346 227.313L28.6874 175.766C25.6974 172.758 24.0131 168.694 24 164.453V91.5472C24.0131 87.3064 25.6974 83.2416 28.6874 80.2344L80.2346 28.6875C83.2418 25.6974 87.3058 24.0132 91.5466 24H164.453C168.694 24.0132 172.759 25.6974 175.766 28.6875ZM167.387 156.932C166.984 155.962 166.393 155.079 165.649 154.337L139.306 127.993L165.649 101.65C167.147 100.149 167.987 98.1152 167.986 95.9952C167.985 93.8752 167.143 91.8416 165.643 90.3432C164.144 88.844 162.111 88.0008 159.991 88C157.871 87.9992 155.838 88.8392 154.337 90.3368L127.993 116.681L101.649 90.3368C100.149 88.8392 98.1146 87.9992 95.9946 88C93.8746 88.0008 91.8418 88.844 90.3426 90.3432C88.8434 91.8416 88.001 93.8752 88.0002 95.9952C87.9986 98.1152 88.8394 100.149 90.337 101.65L116.68 127.993L90.337 154.337C88.8394 155.838 87.9986 157.871 88.0002 159.991C88.001 162.111 88.8434 164.144 90.3426 165.643C91.8418 167.142 93.8746 167.985 95.9946 167.986C98.1146 167.987 100.149 167.147 101.649 165.65L127.993 139.306L154.337 165.65C155.079 166.394 155.961 166.984 156.932 167.387C157.903 167.79 158.943 167.998 159.995 167.998C161.046 167.999 162.087 167.792 163.059 167.39C164.03 166.988 164.912 166.398 165.655 165.655C166.399 164.912 166.988 164.03 167.39 163.058C167.792 162.087 167.999 161.046 167.999 159.995C167.998 158.944 167.79 157.903 167.387 156.932Z"
              fill="currentColor"
            />
          </>
        )
        break

      default:
        path = () => (
          <>
            <path
              d="M164.45 32H91.5496C90.4984 32 89.4584 32.207 88.488 32.609C87.5168 33.011 86.6352 33.6003 85.892 34.3431L34.3431 85.892C33.6003 86.6352 33.011 87.5168 32.609 88.488C32.207 89.4584 32 90.4984 32 91.5496V164.45C32 165.502 32.207 166.542 32.609 167.512C33.011 168.483 33.6003 169.365 34.3431 170.108L85.892 221.657C86.6352 222.4 87.5168 222.989 88.488 223.391C89.4584 223.793 90.4984 224 91.5496 224H164.45C165.502 224 166.542 223.793 167.512 223.391C168.483 222.989 169.365 222.4 170.108 221.657L221.657 170.108C222.4 169.365 222.989 168.483 223.391 167.512C223.793 166.542 224 165.502 224 164.45V91.5496C224 90.4984 223.793 89.4584 223.391 88.488C222.989 87.5168 222.4 86.6352 221.657 85.892L170.108 34.3431C169.365 33.6003 168.483 33.011 167.512 32.609C166.542 32.207 165.502 32 164.45 32Z"
              fill="none"
              stroke="currentColor"
              strokeWidth="18"
              strokeMiterlimit="10"
            />
            <path
              d="M160 96L96 160"
              fill="none"
              stroke="currentColor"
              strokeWidth="18"
              strokeLinecap="round"
              strokeLinejoin="round"
            />
            <path
              d="M160 160L96 96"
              fill="none"
              stroke="currentColor"
              strokeWidth="18"
              strokeLinecap="round"
              strokeLinejoin="round"
            />
          </>
        )
        break
    }

    const renderPath: RenderFunction = (weight: IconWeight) =>
      renderPathForWeight(weight, path)

    const { useIconProps } = useIconContext()
    const parsedProps = useIconProps(props)

    return <IconBase ref={ref} {...parsedProps} renderPath={renderPath} />
  }
)
