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

function IconControlled25DComponent(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-controlled-25D${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 24 24" {...rest} ref={ref}><g><path fill={useCurrentColor ? 'currentColor' : '#AEB1B7'} d="M9.524 8.072H6.986v-1.52c0-.644.128-1.246.383-1.802a4.668 4.668 0 0 1 1.056-1.47 4.938 4.938 0 0 1 1.593-.996 5.4 5.4 0 0 1 2.004-.364c.644 0 1.264.12 1.862.362a5.265 5.265 0 0 1 1.591.996c.463.424.833.915 1.108 1.472a4 4 0 0 1 .413 1.802v1.52H14.56v-.956c0-.846-.236-1.5-.706-1.963-.47-.463-1.108-.696-1.913-.696-.726 0-1.309.233-1.752.696-.444.463-.665 1.117-.665 1.963v.956Zm8.68 1.209c.362 0 .674.132.936.393.263.262.394.574.394.936v7.684a2.688 2.688 0 0 1-.716 1.842 2.42 2.42 0 0 1-.786.554 2.428 2.428 0 0 1-.996.202H6.864a2.361 2.361 0 0 1-1.742-.736 2.364 2.364 0 0 1-.483-.775 2.603 2.603 0 0 1-.171-.947V10.61c0-.362.127-.674.382-.936s.564-.393.927-.393h12.427Z"/><path stroke="#1A1B1E" strokeOpacity=".08" strokeWidth="2.4" d="M8.804 7.352H7.706v-.8c0-.546.108-1.044.317-1.502.215-.47.52-.893.897-1.246a4.238 4.238 0 0 1 1.362-.852 4.706 4.706 0 0 1 1.74-.312c.552 0 1.08.103 1.592.31.506.202.972.494 1.375.861.399.364.713.781.948 1.258.225.453.339.945.339 1.483v.8h-.996v-.236c0-.982-.276-1.842-.92-2.477-.633-.624-1.468-.901-2.419-.901-.894 0-1.675.293-2.273.917-.608.636-.864 1.491-.864 2.461v.236Zm9.4 2.649c.168 0 .298.051.427.182a.559.559 0 0 1 .183.427v7.684c.004.5-.182.981-.52 1.349a1.702 1.702 0 0 1-.553.39 1.717 1.717 0 0 1-.705.139H6.864a1.64 1.64 0 0 1-1.217-.509 1.644 1.644 0 0 1-.336-.541 1.884 1.884 0 0 1-.123-.688V10.61a.576.576 0 0 1 .178-.434.528.528 0 0 1 .41-.175h12.428Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M10.704 13.296a1.296 1.296 0 0 1 2.592 0v3.168a1.296 1.296 0 1 1-2.592 0v-3.168Z"/></g></svg>;
}

const IconControlled25D = React.forwardRef(IconControlled25DComponent);
export default IconControlled25D;
