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

function IconExcelComponent(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-excel${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 28 28" fill="none" {...rest} ref={ref}><g clipPath="url(#svg_1bbd6da834__clip0_896:212507)"><path d="M18.667 1.167h-10.5c-.7 0-1.167.466-1.167 1.166v5.834L18.667 14l4.666 1.75L28 14V8.167l-9.333-7z" fill={useCurrentColor ? 'currentColor' : '#21A366'}/><path d="M7 8.167h11.667V14H7V8.167z" fill={useCurrentColor ? 'currentColor' : '#107C41'}/><path d="M28 2.333v5.834h-9.333v-7h8.166c.584 0 1.167.583 1.167 1.166z" fill={useCurrentColor ? 'currentColor' : '#33C481'}/><path d="M18.667 14H7v11.667c0 .7.467 1.166 1.167 1.166h18.666c.7 0 1.167-.466 1.167-1.166v-5.834L18.667 14z" fill={useCurrentColor ? 'currentColor' : '#185C37'}/><path opacity=".5" d="M16.1 7H7v16.333h8.867c.816 0 1.633-.816 1.633-1.633V8.4c0-.817-.583-1.4-1.4-1.4z" fill={useCurrentColor ? 'currentColor' : '#000'}/><path d="M14.933 22.167H1.4c-.817 0-1.4-.584-1.4-1.4V7.233c0-.816.583-1.4 1.4-1.4h13.65c.7 0 1.283.584 1.283 1.4v13.65c0 .7-.583 1.284-1.4 1.284z" fill={useCurrentColor ? 'currentColor' : '#107C41'}/><path d="M3.967 18.667L7 14 4.2 9.333h2.217l1.516 2.917c.234.35.234.583.35.7l.35-.7 1.634-2.917h2.1L9.567 14l2.916 4.667H10.15L8.4 15.4c0-.117-.117-.233-.233-.467 0 .117-.117.234-.234.467l-1.75 3.267H3.967z" fill={useCurrentColor ? 'currentColor' : '#fff'}/><path d="M18.667 14H28v5.833h-9.333V14z" fill={useCurrentColor ? 'currentColor' : '#107C41'}/></g><defs><clipPath id="svg_1bbd6da834__clip0_896:212507"><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M0 0h28v28H0z"/></clipPath></defs></svg>;
}

const IconExcel = React.forwardRef(IconExcelComponent);
export default IconExcel;
