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

function IconCouponComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-coupon${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><g clipPath="url(#svg_d6e16e12d3__clip0_5072_19784)"><path opacity=".01" d="M-0.333252 -0.333313H16.3334V16.3334H-0.333252V-0.333313Z" fill={useCurrentColor ? 'currentColor' : '#202425'}/><path d="M0.241718 6.66276C0.166191 6.38085 0.146934 6.08683 0.185044 5.79748C0.223155 5.50814 0.317888 5.22913 0.463832 4.9764C0.609777 4.72366 0.804076 4.50215 1.03563 4.32451C1.26719 4.14687 1.53147 4.01659 1.81338 3.94109L11.4723 1.35276C11.7542 1.27715 12.0483 1.25783 12.3377 1.2959C12.6271 1.33397 12.9062 1.42868 13.159 1.57464C13.4118 1.72059 13.6333 1.91491 13.811 2.14651C13.9887 2.37811 14.119 2.64245 14.1945 2.92442L15.2562 6.88887H0.301718L0.241162 6.66276H0.241718Z" fill={useCurrentColor ? 'currentColor' : '#FDBC7A'}/><path d="M0.222168 6.88891C0.222168 6.59708 0.279647 6.30811 0.391325 6.0385C0.503002 5.76889 0.666689 5.52391 0.873042 5.31756C1.07939 5.11121 1.32437 4.94752 1.59398 4.83584C1.8636 4.72417 2.15256 4.66669 2.44439 4.66669H13.5555C13.8473 4.66669 14.1363 4.72417 14.4059 4.83584C14.6755 4.94752 14.9205 5.11121 15.1268 5.31756C15.3332 5.52391 15.4969 5.76889 15.6086 6.0385C15.7202 6.30811 15.7777 6.59708 15.7777 6.88891V7.08335C15.7777 7.33724 15.6022 7.55224 15.3738 7.66169C14.9954 7.84255 14.6759 8.12681 14.4522 8.48161C14.2286 8.83641 14.1099 9.24727 14.1099 9.66669C14.1099 10.0861 14.2286 10.497 14.4522 10.8518C14.6759 11.2066 14.9954 11.4908 15.3738 11.6717C15.6022 11.7811 15.7777 11.9961 15.7777 12.2495V12.4445C15.7777 12.7363 15.7202 13.0253 15.6086 13.2949C15.4969 13.5645 15.3332 13.8095 15.1268 14.0158C14.9205 14.2222 14.6755 14.3859 14.4059 14.4975C14.1363 14.6092 13.8473 14.6667 13.5555 14.6667H2.44439C2.15256 14.6667 1.8636 14.6092 1.59398 14.4975C1.32437 14.3859 1.07939 14.2222 0.873042 14.0158C0.666689 13.8095 0.503002 13.5645 0.391325 13.2949C0.279647 13.0253 0.222168 12.7363 0.222168 12.4445V12.25C0.222168 11.9961 0.397724 11.7811 0.626057 11.6717C1.00448 11.4908 1.32399 11.2066 1.54766 10.8518C1.77133 10.497 1.89003 10.0861 1.89003 9.66669C1.89003 9.24727 1.77133 8.83641 1.54766 8.48161C1.32399 8.12681 1.00448 7.84255 0.626057 7.66169C0.397724 7.55224 0.222168 7.33724 0.222168 7.08391V6.88891Z" fill={useCurrentColor ? 'currentColor' : '#F74'}/><path d="M5.77767 6.61108C5.99868 6.61108 6.21064 6.69888 6.36692 6.85516C6.52321 7.01144 6.611 7.2234 6.611 7.44442V11.8889C6.611 12.1099 6.52321 12.3218 6.36692 12.4781C6.21064 12.6344 5.99868 12.7222 5.77767 12.7222C5.55666 12.7222 5.34469 12.6344 5.18841 12.4781C5.03213 12.3218 4.94434 12.1099 4.94434 11.8889V7.44442C4.94434 7.2234 5.03213 7.01144 5.18841 6.85516C5.34469 6.69888 5.55666 6.61108 5.77767 6.61108Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></g><defs><clipPath id="svg_d6e16e12d3__clip0_5072_19784"><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M0 0H16V16H0z"/></clipPath></defs></svg>;
}

const IconCoupon = React.forwardRef(IconCouponComponent);
export default IconCoupon;
