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

function IconPdfComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-pdf${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 28 28" fill="none" {...rest} ref={ref}><path d="M25.2 7.7v17.189c0 1.718-1.407 3.111-3.143 3.111H5.943C4.207 28 2.8 26.607 2.8 24.889V3.11C2.8 1.393 4.207 0 5.943 0h11.78L25.2 7.7z" fill={useCurrentColor ? 'currentColor' : '#E56060'}/><path d="M17.723 0L25.2 7.7h-6.009c-.81 0-1.468-.566-1.468-1.441V0z" fill={useCurrentColor ? 'currentColor' : '#D43030'}/><path d="M17.501 16.287a8.635 8.635 0 00-1.79.221 9.324 9.324 0 01-1.777-2.472c.492-1.719.514-2.891.147-3.446a.926.926 0 00-.733-.404.909.909 0 00-.889.5c-.513.918.228 2.74.573 3.477a22.863 22.863 0 01-1.512 3.82c-2.744 1.266-2.825 2.035-2.825 2.312.01.342.197.648.484.792a.693.693 0 00.426.12c.733 0 1.54-.864 2.429-2.552 1.09-.498 2.225-.89 3.39-1.172.58.537 1.325.863 2.114.926.484 0 1.467 0 1.467-1.053.008-.357-.19-1.038-1.504-1.07zm-7.845 4.04h-.088c.241-.398.6-.71 1.027-.896a1.94 1.94 0 01-.939.896zm3.508-9.183a.164.164 0 01.117 0h.088a2.825 2.825 0 010 1.585 2.674 2.674 0 01-.205-1.585zm1.468 5.973c-.66.167-1.31.373-1.945.619v-.064h-.059c.317-.684.604-1.382.86-2.091v-.064c.33.543.71 1.047 1.136 1.505h-.08l.088.096zm2.935.405a2.334 2.334 0 01-.866-.206c.241-.051.488-.073.734-.063.565 0 .683.15.683.245a1.155 1.155 0 01-.558.024h.007z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconPdf = React.forwardRef(IconPdfComponent);
export default IconPdf;
