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

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

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-fencing${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M38.264 9.15a1 1 0 010 1.415L26.828 22l3.572 3.573a9.003 9.003 0 0113.272 4.599l.423 1.19-3.952 3.952 2.12 2.122a1 1 0 01.078 1.327l-.078.087-1.414 1.415a1 1 0 01-1.327.077l-.087-.077-2.12-2.122-3.953 3.954-1.191-.424A9.003 9.003 0 0127.572 28.4L24 24.828 20.428 28.4c2.191 3.477 1.772 8.127-1.256 11.155a8.971 8.971 0 01-3.343 2.116l-1.19.424-3.953-3.954-2.121 2.122a1 1 0 01-1.414 0l-1.414-1.415a1 1 0 010-1.414l2.12-2.122-3.952-3.951.423-1.191A9.003 9.003 0 0117.6 25.572L21.173 22 9.737 10.565a1 1 0 01-.078-1.327l.078-.087 1.414-1.414a1 1 0 011.327-.078l.087.078L24 19.17 35.435 7.737a1 1 0 011.414 0l1.415 1.414zm-21.92 20.507a5 5 0 00-7.709.778l6.93 6.93a5 5 0 00.778-7.708zm22.384 0a5 5 0 00-6.89-.172l-.15.141-.061.062a5 5 0 00-.12 6.884l.15.156c.24.24.501.453.778.637l6.93-6.93a5.026 5.026 0 00-.637-.778z"/></svg>;
}

const IconFencing = React.forwardRef(IconFencingComponent);
export default IconFencing;
