import React, { ForwardedRef, useContext } from 'react';
import { OriginIconProps } from '../type';
import { Context } from '../context';

function IconDiagramCrackingComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-diagram-cracking${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect width="24" height="24" rx="6" fill={useCurrentColor ? 'currentColor' : '#1A1B1E'} fillOpacity=".05"/><g fill={useCurrentColor ? 'currentColor' : '#CCC'}><path d="M12.4017 8.18066L13.4065 10.9287L9.65653 14.9912L13.4065 19.6787L11.9759 20.582H3.12333C2.73806 20.5817 2.49879 20.1629 2.69462 19.8311L4.08915 17.4727C4.22558 17.2419 4.5048 17.1725 4.72489 17.2725L6.66532 11.9414C6.82406 11.5056 7.44036 11.5042 7.60087 11.9395L8.42509 14.1748L9.32255 12.2129C9.49666 11.8324 10.034 11.823 10.221 12.1973L10.6097 12.9766L12.0784 8.50098C12.1343 8.3309 12.2592 8.22408 12.4017 8.18066ZM6.72978 4.1875C7.82627 4.18751 8.71507 5.07637 8.71513 6.17285C8.71513 7.26938 7.8263 8.15819 6.72978 8.1582C5.63324 8.1582 4.74442 7.26939 4.74442 6.17285C4.74448 5.07636 5.63327 4.1875 6.72978 4.1875Z"/><path d="M17.3271 15.2393L17.9014 14.0967C18.0895 13.7216 18.6287 13.7335 18.8008 14.1162L21.1943 19.4385C21.3424 19.7679 21.1013 20.1403 20.7402 20.1406H14.6309L16.0625 19.2363L12.3125 14.3926L15.8086 10.75L17.3271 15.2393Z"/></g></svg>;
}

const IconDiagramCracking = React.forwardRef(IconDiagramCrackingComponent);
export default IconDiagramCracking;
