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 = true, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-PDF${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 14 14" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M5.0918 9.9834C4.89387 10.4392 4.67148 10.5093 4.46484 10.6191 4.48041 10.5831 4.5003 10.5455 4.52441 10.5098 4.57765 10.431 4.72303 10.2784 5.0918 9.9834zM9.36328 8.83789C9.79589 8.83789 10.0301 8.91449 10.1504 8.97852 10.1874 8.99824 10.2143 9.0173 10.2334 9.0332 10.1993 9.05942 10.1327 9.0918 10.0127 9.0918 9.81283 9.09179 9.55043 9.00741 9.23047 8.83984 9.27593 8.83832 9.32028 8.83789 9.36328 8.83789zM6.90039 7.56543C7.11135 7.91283 7.37931 8.26456 7.68066 8.5332 7.09234 8.65932 6.60349 8.77541 6.25195 8.89844 6.62815 8.2469 6.87495 7.63184 6.90039 7.56543zM6.87988 5.01953C6.94729 5.06977 6.97897 5.41872 6.97266 5.62109 6.96416 5.89291 6.96186 5.99804 6.92773 6.16504 6.83526 5.81698 6.82872 5.19138 6.87891 5.02148L6.87988 5.01953z"/><path fillRule="evenodd" clipRule="evenodd" d="M8.75 0.583008C8.90463 0.583008 9.05273 0.644612 9.16211 0.753906L12.0791 3.6709C12.1884 3.78028 12.25 3.92838 12.25 4.08301V11.666C12.25 12.1301 12.0654 12.5751 11.7373 12.9033C11.4091 13.2315 10.9641 13.416 10.5 13.416H3.5C3.03587 13.416 2.59088 13.2315 2.2627 12.9033C1.93461 12.5751 1.75 12.1301 1.75 11.666V2.33301C1.75 1.86888 1.93451 1.42389 2.2627 1.0957C2.59088 0.767514 3.03587 0.583008 3.5 0.583008H8.75ZM6.82324 4.6377C6.73433 4.63772 6.65127 4.66372 6.58301 4.71289C6.0506 5.09701 6.63191 6.90782 6.64746 6.95605C6.39622 7.56571 6.07965 8.21175 5.75391 8.7793C5.64806 8.9637 5.64727 8.96707 5.57617 9.05078C5.55738 9.06013 4.64064 9.51829 4.20801 10.0254C3.96109 10.315 3.95271 10.5141 3.96582 10.6631C3.9871 10.8417 4.21512 11.001 4.44434 11.001C4.45372 11.001 4.46341 11.0006 4.47266 11C4.70559 10.9858 4.96465 10.922 5.25293 10.6494C5.46175 10.4519 5.69714 9.91555 5.99902 9.39062C6.86493 9.14776 7.62693 8.97467 8.26562 8.87598C8.73411 9.12456 9.43178 9.40625 9.90625 9.40625C10.0652 9.40622 10.1929 9.37352 10.2861 9.31055C10.3978 9.23509 10.4461 9.1409 10.4756 8.9668C10.5049 8.79298 10.4635 8.66113 10.3818 8.56543C10.2371 8.39597 9.9403 8.31353 9.47461 8.31348C9.20377 8.31348 8.83004 8.32034 8.45508 8.37598C7.44569 7.64829 7.19833 6.86708 7.19141 6.84473C7.19141 6.84473 7.3658 6.40537 7.37695 5.68848C7.38397 5.23516 7.31219 4.89632 7.12891 4.75098C7.05084 4.68914 6.93725 4.6377 6.82324 4.6377Z"/></svg>;
}

const IconPDF = React.forwardRef(IconPDFComponent);
export default IconPDF;
