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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-Quote${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M20 2C20.7957 2 21.5585 2.3163 22.1211 2.87891C22.6837 3.44152 23 4.20435 23 5V17C23 17.7957 22.6837 18.5585 22.1211 19.1211C21.5585 19.6837 20.7957 20 20 20H6.82812C6.56296 20.0001 6.30857 20.1054 6.12109 20.293L3.91895 22.4951C3.6799 22.7341 3.37545 22.8969 3.04395 22.9629C2.71233 23.0288 2.36805 22.9956 2.05566 22.8662C1.74327 22.7368 1.47598 22.5174 1.28809 22.2363C1.10019 21.9552 1.00004 21.6243 1 21.2861V5C1 4.20435 1.3163 3.44152 1.87891 2.87891C2.44152 2.3163 3.20435 2 4 2H20ZM9 6C7.9315 6 7.06075 6.83801 7.00488 7.89258C7.00112 7.92784 7 7.96374 7 8C7 8.03593 7.00119 8.07149 7.00488 8.10645C7.06027 9.16148 7.93118 10 9 10V12C9 12.2652 8.89457 12.5195 8.70703 12.707C8.51949 12.8946 8.26522 13 8 13C7.44772 13 7 13.4477 7 14C7 14.5523 7.44772 15 8 15C8.79565 15 9.55849 14.6837 10.1211 14.1211C10.6837 13.5585 11 12.7957 11 12V8C11 7.9637 10.9979 7.92787 10.9941 7.89258C10.9382 6.83803 10.0685 6 9 6ZM15 6C13.9315 6 13.0608 6.83801 13.0049 7.89258C13.0011 7.92784 13 7.96374 13 8C13 8.03593 13.0012 8.07149 13.0049 8.10645C13.0603 9.16148 13.9312 10 15 10V12C15 12.2652 14.8946 12.5195 14.707 12.707C14.5195 12.8946 14.2652 13 14 13C13.4477 13 13 13.4477 13 14C13 14.5523 13.4477 15 14 15C14.7957 15 15.5585 14.6837 16.1211 14.1211C16.6837 13.5585 17 12.7957 17 12V8C17 7.9637 16.9979 7.92787 16.9941 7.89258C16.9382 6.83803 16.0685 6 15 6Z"/></svg>;
}

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