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

function IconSpecifiedResourceComponent(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-specified-resource${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 18 18" {...rest} ref={ref}><path fillRule="evenodd" d="M5.537 3.075a1.8 1.8 0 0 0-1.8 1.8v2.402a1.8 1.8 0 0 0-1.614 2.382l1.39 4.05a1.8 1.8 0 0 0 1.702 1.216h7.57a1.8 1.8 0 0 0 1.702-1.216l1.39-4.05a1.8 1.8 0 0 0-1.614-2.382V6.259a1.8 1.8 0 0 0-1.774-1.8l-2.687-.038a.45.45 0 0 1-.303-.124L8.73 3.57a1.8 1.8 0 0 0-1.239-.494H5.537Zm-1.145 5.55h9.783a.45.45 0 0 1 .425.596l-1.39 4.05a.45.45 0 0 1-.425.304h-7.57a.45.45 0 0 1-.426-.304L3.4 9.22a.45.45 0 0 1 .426-.596h.567Zm8.521-1.35V6.259a.45.45 0 0 0-.443-.45L9.783 5.77a1.8 1.8 0 0 1-1.213-.493l-.768-.728a.45.45 0 0 0-.31-.124H5.537a.45.45 0 0 0-.45.45v2.4h7.826Z" clipRule="evenodd"/></svg>;
}

const IconSpecifiedResource = React.forwardRef(IconSpecifiedResourceComponent);
export default IconSpecifiedResource;
