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

function IconQuoteComponent(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-quote${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="m15.8 10.28.482.483a.71.71 0 0 1 0 1.01L11.556 16.5h-1.493v-1.493l3.715-3.719 1.01-1.007a.716.716 0 0 1 1.012 0Z" clipRule="evenodd" opacity=".5"/><path fillRule="evenodd" d="M15.75 10.235V6.151a.6.6 0 0 0-.18-.43l-4.145-4.05a.6.6 0 0 0-.42-.171H2.85a.6.6 0 0 0-.6.6v13.8a.6.6 0 0 0 .6.6h12.3a.6.6 0 0 0 .6-.6v-3.594L11.556 16.5h-1.493v-1.493l3.715-3.719 1.01-1.007a.716.716 0 0 1 .962-.046ZM10.875 7.67h-3.75a.375.375 0 0 0-.375.375v.75c0 .207.168.375.375.375h3.75a.375.375 0 0 0 .375-.375v-.75a.375.375 0 0 0-.375-.375Zm0 3.75h-3.75a.375.375 0 0 0-.375.375v.75c0 .207.168.375.375.375h3.75a.375.375 0 0 0 .375-.375v-.75a.375.375 0 0 0-.375-.375Z" clipRule="evenodd"/></svg>;
}

const IconQuote = React.forwardRef(IconQuoteComponent);
export default IconQuote;
