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

function IconCopyComponent(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-copy${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 48 48" {...rest} ref={ref}><path d="M38 8H20V4h18a4 4 0 0 1 4 4v22h-4V8Zm-4 32.009A3.99 3.99 0 0 1 30.003 44H9.995A3.996 3.996 0 0 1 6 40V16a4 4 0 0 1 4-4h20c2.205 0 4 1.784 4 3.997V40.01ZM10 40h20V16H10v24Z"/></svg>;
}

const IconCopy = React.forwardRef(IconCopyComponent);
export default IconCopy;
