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

function IconAlertAIComponent(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-AlertAI${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M9.667 13.333c.184 0 .333.15.333.334v.666a.334.334 0 0 1-.333.334H6.333A.334.334 0 0 1 6 14.333v-.666c0-.184.15-.334.333-.334h3.334ZM9 1c.184 0 .333.15.333.333v.507c.254.067.39.109.559.184a.24.24 0 0 1 .093.36l-.5.71a.261.261 0 0 1-.295.094A3.846 3.846 0 0 0 8 3C5.791 3 4 4.869 4 7.174V11h8V8.35a.25.25 0 0 1 .25-.25h.833a.25.25 0 0 1 .25.25V11h1c.184 0 .334.15.334.333V12c0 .184-.15.333-.334.333H1.667A.334.334 0 0 1 1.333 12v-.667c0-.184.15-.333.334-.333h1V7.172c0-2.565 1.7-4.721 4-5.332v-.507c0-.184.15-.333.333-.333h2Zm.161 3.518c.098-.378.635-.38.735-.002l.098.376c.14.528.553.94 1.081 1.08l.375.1c.378.099.377.636-.002.734l-.368.095a1.519 1.519 0 0 0-1.088 1.082l-.096.368c-.1.378-.637.376-.735-.002l-.093-.36a1.518 1.518 0 0 0-1.09-1.09l-.36-.093c-.379-.099-.38-.635-.002-.735l.367-.096a1.52 1.52 0 0 0 1.083-1.088l.095-.37Zm3.557-2.302c.074-.287.48-.288.557-.002l.075.284c.106.4.418.714.818.82l.284.075c.287.075.286.482 0 .556l-.28.072a1.15 1.15 0 0 0-.824.82l-.073.278c-.076.286-.482.285-.557 0l-.07-.274a1.151 1.151 0 0 0-.826-.825l-.273-.07c-.286-.075-.288-.482-.002-.557l.278-.074c.403-.106.716-.421.82-.824l.073-.28Z"/></svg>;
}

const IconAlertAI = React.forwardRef(IconAlertAIComponent);
export default IconAlertAI;
