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

function IconPlanComponent(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-plan${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M41 42a1 1 0 011 1v2a1 1 0 01-1 1H7a1 1 0 01-1-1v-2a1 1 0 011-1h34zM20.118 1.882a2 2 0 011.049.297l20.183 12.42a2 2 0 010 3.407L22 29.913V36h14a1 1 0 011 1v2a1 1 0 01-1 1H12a1 1 0 01-1-1v-2a1 1 0 011-1h6V19h.118V3.882a2 2 0 012-2zm2 5.579v17.683l14.368-8.841L22.118 7.46z"/></svg>;
}

const IconPlan = React.forwardRef(IconPlanComponent);
export default IconPlan;
