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

function IconPdfFileComponent(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-pdf-file${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M34.171 2a2 2 0 011.415.586l5.828 5.831A2 2 0 0142 9.831V44a2 2 0 01-2 2H8a2 2 0 01-2-2V4a2 2 0 012-2h26.171zM32 6H10v36h28V12.038l-5 .001a1 1 0 01-1-1L31.999 6zm-8.276 7.224c2.17.426 2.893 3.463 2.105 6.66a44.93 44.93 0 01-.878 3.027l-.216-.42.276.54a50.053 50.053 0 002.96 4.95c3.353.08 6.433.928 7.477 2.745 1.468 2.555-.998 5.274-4.18 4.468-1.318-.334-2.909-1.907-4.731-4.392-1.623.087-3.376.41-5.042.926l.258-.566a60.806 60.806 0 01-2.386 4.769c-1.296 2.306-3.595 3.095-5.33 1.917-1.768-1.201-1.762-3.651.106-5.35 1.32-1.201 3.166-2.24 5.296-3.028l-.072.16.195-.435a82.094 82.094 0 002.365-6.07c-1.114-2.296-1.85-4.336-2.078-5.893-.131-.896-.043-1.839.385-2.62.649-1.181 1.915-1.697 3.49-1.388zm-6.206 20.247a9.842 9.842 0 00-1.49 1.097c-.598.544-.599.84-.417.964.26.177.767.004 1.316-.973.197-.35.394-.714.591-1.088zm12.795-2.437c.755.85 1.353 1.372 1.643 1.446.924.234 1.218-.091 1.065-.359-.244-.423-1.321-.833-2.708-1.087zm-6.568-4.508l-.048.146-.046-.09-.296.768c-.117.3-.237.6-.359.9l.081-.027-.107.236.524-.103c.392-.073.784-.136 1.173-.188l-.114-.16.089-.002-.255-.41c-.217-.353-.432-.71-.642-1.07zm-1.056-10.567c-.087.159-.12.52-.07.868.085.58.276 1.288.56 2.092.198-.953.207-1.816.054-2.455a1.763 1.763 0 00-.197-.52c-.29-.053-.319-.036-.347.015z"/></svg>;
}

const IconPdfFile = React.forwardRef(IconPdfFileComponent);
export default IconPdfFile;
