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

function IconTimeComponent(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 || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-time${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M8 1.333a6.667 6.667 0 1 1-.001 13.334A6.667 6.667 0 0 1 8 1.333Zm0 1.333a5.334 5.334 0 1 0 0 10.67 5.334 5.334 0 0 0 0-10.67ZM8 4c.368 0 .666.298.666.666v3.058l2.139 2.138a.667.667 0 0 1-.944.943L7.724 8.666a1.331 1.331 0 0 1-.391-.942V4.666C7.333 4.298 7.632 4 8 4Z"/></svg>;
}

const IconTime = React.forwardRef(IconTimeComponent);
export default IconTime;
