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

function IconCalendarLoadingComponent(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-CalendarLoading${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M90.0002 50C90.0002 27.9086 72.0916 10 50.0001 10C27.9086 10 10 27.9086 10 50C10 72.0914 27.9086 90 50.0001 90C72.0916 90 90.0002 72.0914 90.0002 50Z" stroke="url(#svg_0cc175b9c0__paint0_angular_3936_14)" strokeWidth="20"/><circle cx="10" cy="10" transform="matrix(1 0 0 -1 40 20)" fill={useCurrentColor ? 'currentColor' : '#143975'} r="10"/><defs><radialGradient id="svg_0cc175b9c0__paint0_angular_3936_14" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -38 38.0001 0 50 50)"><stop stopColor="#143975"/><stop offset="1" stopColor="#fff"/></radialGradient></defs></svg>;
}

const IconCalendarLoading = React.forwardRef(IconCalendarLoadingComponent);
export default IconCalendarLoading;
