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

function IconPromptCreateCopyComponent(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-prompt_create-copy${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="M17.167 12.083V2.916a.083.083 0 0 0-.083-.083H8.75a.083.083 0 0 0-.083.083v1.25a.75.75 0 0 1-1.5 0v-1.25c0-.874.709-1.583 1.583-1.583h8.334c.874 0 1.583.71 1.583 1.583v9.167c0 .875-.709 1.583-1.583 1.583h-1.667a.75.75 0 0 1 0-1.5h1.667a.083.083 0 0 0 .083-.083Z"/><path d="M11.333 8.333a.083.083 0 0 0-.083-.083H2.916a.083.083 0 0 0-.083.083v8.334c0 .046.037.083.083.083h8.334a.083.083 0 0 0 .083-.083V8.333Zm1.5 8.334c0 .874-.709 1.583-1.583 1.583H2.916a1.583 1.583 0 0 1-1.583-1.583V8.333c0-.874.71-1.583 1.583-1.583h8.334c.874 0 1.583.709 1.583 1.583v8.334Z"/><path d="M6.333 14.584v-4.167a.75.75 0 0 1 1.5 0v4.167a.75.75 0 0 1-1.5 0Z"/><path d="M9.167 11.75a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1 0-1.5h4.167Z"/></svg>;
}

const IconPromptCreateCopy = React.forwardRef(IconPromptCreateCopyComponent);
export default IconPromptCreateCopy;
