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

function IconBuildCommunityComponent(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-build-community${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 fillRule="evenodd" d="M12.218 2.191A2.282 2.282 0 0 1 14.5 4.474v7.745a2.282 2.282 0 0 1-2.282 2.281H4.473a2.281 2.281 0 0 1-2.282-2.281V9.037a.622.622 0 0 1 1.245 0v3.182c0 .572.464 1.037 1.037 1.037h7.745c.572 0 1.037-.465 1.037-1.037V4.474c0-.573-.464-1.037-1.037-1.037h-3.18a.623.623 0 1 1 0-1.246h3.18ZM4.542 1.5c.344 0 .622.28.622.623v1.798h1.799a.622.622 0 0 1 0 1.244H5.164v1.798a.622.622 0 1 1-1.244 0V5.165H2.122a.622.622 0 1 1 0-1.244H3.92V2.123c0-.344.278-.623.622-.623Z" clipRule="evenodd"/></svg>;
}

const IconBuildCommunity = React.forwardRef(IconBuildCommunityComponent);
export default IconBuildCommunity;
