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

function IconGroupComponent(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-group${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path d="M11.9533 11.1846H12.0437C14.1308 11.1606 15.8173 9.50284 15.8173 7.46434V6.22326C15.8173 4.16677 14.1067 2.5 11.9985 2.5C9.89032 2.5 8.1797 4.16677 8.1797 6.22326V7.46434C8.1797 9.50284 9.86623 11.1606 11.9533 11.1846ZM19.362 11.7272C20.7173 11.7272 21.8165 10.684 21.8165 9.40091V8.62149C21.8165 7.33544 20.7173 6.2952 19.362 6.2952C18.0068 6.2952 16.9075 7.33843 16.9075 8.62149V9.39792C16.9075 10.684 18.0068 11.7272 19.362 11.7272ZM4.63496 11.7272C5.99021 11.7272 7.08947 10.684 7.08947 9.40091V8.62149C7.08947 7.33544 5.99021 6.2952 4.63496 6.2952C3.27971 6.2952 2.18045 7.33843 2.18045 8.62149V9.39792C2.17744 10.684 3.2767 11.7272 4.63496 11.7272ZM1.09324 14.0955C0.448739 14.4222 0 15.1537 0 16.011V16.9673C0 17.5999 0.367424 18.1275 0.870372 18.3014C1.65341 18.5052 2.45451 18.6401 3.27369 18.7151V17.0273C3.27369 15.5194 3.82181 14.1974 4.65604 13.361H4.63496C3.38813 13.355 2.1925 13.6188 1.09324 14.0955ZM22.9128 14.0985C21.8105 13.6188 20.6149 13.355 19.362 13.355H19.344C20.1812 14.1944 20.7263 15.5164 20.7263 17.0213V18.7121C21.5425 18.6371 22.3466 18.5022 23.1236 18.2984C23.6266 18.1275 24 17.5969 24 16.9613V16.014C24 15.1567 23.5513 14.4282 22.9128 14.0985ZM17.4255 14.0025C15.739 13.2321 13.9109 12.8094 11.9985 12.8094C10.0891 12.8094 8.26703 13.2321 6.58351 13.9965C5.59869 14.5151 4.90902 15.6873 4.90902 17.0573V18.5861C4.90902 19.5994 5.47221 20.4478 6.24018 20.7236C8.09537 21.2242 10.0198 21.5 12.0015 21.5C13.9802 21.5 15.9016 21.2302 17.7538 20.7266C18.5278 20.4538 19.091 19.6024 19.091 18.5891V17.0603C19.091 15.6933 18.4043 14.5241 17.4255 14.0025Z"/></svg>;
}

const IconGroup = React.forwardRef(IconGroupComponent);
export default IconGroup;
