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

function IconUserLineComponent(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-user-line${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="M10.468 8.178a4.763 4.763 0 0 1 4.762 4.762v.825c0 .809-.656 1.465-1.465 1.465H2.225A1.465 1.465 0 0 1 .76 13.765v-.825a4.763 4.763 0 0 1 4.762-4.762h4.946ZM5.522 9.46a3.48 3.48 0 0 0-3.478 3.48v.824c0 .1.081.181.182.181h11.539c.1 0 .181-.081.181-.181v-.825a3.48 3.48 0 0 0-3.478-3.48H5.522ZM7.995.76a3.115 3.115 0 1 1 0 6.23 3.115 3.115 0 0 1 0-6.23Zm0 1.284a1.83 1.83 0 1 0 0 3.661 1.83 1.83 0 0 0 0-3.661Z"/></svg>;
}

const IconUserLine = React.forwardRef(IconUserLineComponent);
export default IconUserLine;
