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 || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-Copy${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M12.0625 3H1.125C0.87636 3 0.637903 3.09877 0.462087 3.27459C0.286272 3.4504 0.1875 3.68886 0.1875 3.9375V14.875C0.1875 15.1236 0.286272 15.3621 0.462087 15.5379C0.637903 15.7137 0.87636 15.8125 1.125 15.8125H12.0625C12.3111 15.8125 12.5496 15.7137 12.7254 15.5379C12.9012 15.3621 13 15.1236 13 14.875V3.9375C13 3.68886 12.9012 3.4504 12.7254 3.27459C12.5496 3.09877 12.3111 3 12.0625 3ZM11.125 13.9375H2.0625V4.875H11.125V13.9375ZM15.8125 1.125V12.0625C15.8125 12.3111 15.7137 12.5496 15.5379 12.7254C15.3621 12.9012 15.1236 13 14.875 13C14.6264 13 14.3879 12.9012 14.2121 12.7254C14.0363 12.5496 13.9375 12.3111 13.9375 12.0625V2.0625H3.9375C3.68886 2.0625 3.4504 1.96373 3.27459 1.78791C3.09877 1.6121 3 1.37364 3 1.125C3 0.87636 3.09877 0.637903 3.27459 0.462087C3.4504 0.286272 3.68886 0.1875 3.9375 0.1875H14.875C15.1236 0.1875 15.3621 0.286272 15.5379 0.462087C15.7137 0.637903 15.8125 0.87636 15.8125 1.125Z"/></svg>;
}

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