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

function IconLesseeComponent(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-lessee${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path d="M7.681 2.083 2.084 7.681V2.963a.88.88 0 0 1 .88-.88H7.68Zm2.369 7.549a2.436 2.436 0 0 0 0-1.982 2.35 2.35 0 0 1 2.14-1.403c1.298 0 2.35 1.072 2.35 2.394 0 1.323-1.052 2.395-2.35 2.395a2.35 2.35 0 0 1-2.14-1.404Zm.709 5.698h4.28v-1.196A2.899 2.899 0 0 0 10 12.18a2.89 2.89 0 0 1 .759 1.955v1.197Z" opacity=".5"/><path fillRule="evenodd" d="M2.083 17.037V7.681l5.598-5.598h9.356a.88.88 0 0 1 .88.88v14.074a.88.88 0 0 1-.88.88H2.963a.88.88 0 0 1-.88-.88Zm8.176-8.396c0 1.323-1.052 2.395-2.35 2.395-1.299 0-2.35-1.072-2.35-2.395 0-1.322 1.051-2.394 2.35-2.394 1.298 0 2.35 1.072 2.35 2.394Zm-5.298 5.493a2.899 2.899 0 1 1 5.798 0v1.197H4.96v-1.197Zm5.298-5.493c0 .354-.075.69-.21.991a2.35 2.35 0 0 0 2.14 1.404c1.299 0 2.35-1.072 2.35-2.395 0-1.322-1.051-2.394-2.35-2.394a2.35 2.35 0 0 0-2.14 1.403c.135.302.21.638.21.991Zm4.78 6.69h-4.28v-1.197c0-.753-.288-1.44-.759-1.955a2.899 2.899 0 0 1 5.04 1.955v1.197Z" clipRule="evenodd"/></svg>;
}

const IconLessee = React.forwardRef(IconLesseeComponent);
export default IconLessee;
