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

function IconWebComponent(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-Web${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M8.00098 0.666016C12.051 0.666051 15.3339 3.94902 15.334 7.99902C15.334 12.0491 12.051 15.332 8.00098 15.332C3.95089 15.332 0.667969 12.0491 0.667969 7.99902C0.668039 3.949 3.95093 0.666016 8.00098 0.666016ZM6.01465 8.66602C6.00099 10.9993 7.001 13.999 8.00098 13.999C9.00093 13.9989 10.001 10.9993 9.9873 8.66602H6.01465ZM2.03711 8.66602C2.28428 10.9014 3.75982 12.7667 5.77344 13.5723C5.33406 12.666 4.69084 10.5326 4.68066 8.66602H2.03711ZM11.3213 8.66602C11.3111 10.7992 10.6679 12.6659 10.2285 13.5723C12.242 12.7667 13.7167 10.9013 13.9639 8.66602H11.3213ZM5.77344 2.42578C3.75986 3.23126 2.28436 5.09675 2.03711 7.33203H4.68066C4.69089 5.19889 5.33408 3.33206 5.77344 2.42578ZM8.00098 1.99902C7.00104 1.99902 6.00107 4.99876 6.01465 7.33203H9.9873C10.0009 4.99881 9.00089 1.99915 8.00098 1.99902ZM10.2285 2.42578C10.6679 3.33205 11.3111 5.46548 11.3213 7.33203H13.9639C13.7166 5.09683 12.242 3.23127 10.2285 2.42578Z"/></svg>;
}

const IconWeb = React.forwardRef(IconWebComponent);
export default IconWeb;
