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

function IconThemeFollowSystemComponent(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-ThemeFollowSystem${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C11.6954 22 11.3943 21.9837 11.0967 21.957C11.0661 21.9543 11.0354 21.9532 11.0049 21.9502C9.3517 21.7869 7.81814 21.2197 6.50098 20.3506C6.48092 20.3374 6.4604 20.3249 6.44043 20.3115C6.06752 20.0616 5.71305 19.7867 5.37793 19.4902C5.33304 19.4505 5.2874 19.4116 5.24316 19.3711C5.01676 19.1634 4.79924 18.9462 4.59277 18.7188C4.56391 18.6869 4.5372 18.6532 4.50879 18.6211C4.21234 18.2859 3.93738 17.9315 3.6875 17.5586C3.67415 17.5386 3.66164 17.5181 3.64844 17.498C2.60766 15.9203 2 14.0315 2 12C2 9.9682 2.60739 8.07887 3.64844 6.50098C3.66164 6.48092 3.67415 6.4604 3.6875 6.44043C3.94036 6.06311 4.21903 5.70482 4.51953 5.36621C4.65169 5.2172 4.78708 5.07034 4.92871 4.92871C5.04332 4.8141 5.16024 4.70173 5.28027 4.59277C5.31208 4.56391 5.34579 4.53721 5.37793 4.50879C5.71305 4.21233 6.06753 3.9374 6.44043 3.6875C6.4604 3.67415 6.48092 3.66164 6.50098 3.64844C7.81806 2.77946 9.35185 2.21213 11.0049 2.04883C11.0354 2.04578 11.0661 2.04476 11.0967 2.04199C11.3943 2.01534 11.6955 2 12 2ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4V20Z"/></svg>;
}

const IconThemeFollowSystem = React.forwardRef(IconThemeFollowSystemComponent);
export default IconThemeFollowSystem;
