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

function IconLastRunComponent(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-last-run${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="M10.956 5.246a5.214 5.214 0 0 1-.268 10.422 5.214 5.214 0 0 1 0-10.429l.268.007ZM.1 2.163C.1.843 1.5-.008 2.673.6l4.383 2.272 1.507.98a.698.698 0 0 1-.76 1.17L6.36 4.085l-.008-.005-4.32-2.241a.367.367 0 0 0-.522.228l-.013.097v10.502c0 .257.259.433.498.34l1.403-.544a.363.363 0 0 0 .068-.033l.646-.42a.698.698 0 0 1 .76 1.17l-.646.42a1.647 1.647 0 0 1-.158.09l-.165.076-1.404.544A1.762 1.762 0 0 1 .1 12.665V2.163Zm10.588 4.371a3.918 3.918 0 0 0-3.918 3.92l.004.201a3.918 3.918 0 0 0 7.827 0l.004-.202a3.919 3.919 0 0 0-3.918-3.919Zm.13.75c.294.06.517.32.517.633v2.228c0 .026.01.051.03.07l1.556 1.558a.648.648 0 0 1-.916.915l-1.634-1.633a1.134 1.134 0 0 1-.332-.801V7.917c0-.357.291-.647.649-.647l.13.013Z"/></svg>;
}

const IconLastRun = React.forwardRef(IconLastRunComponent);
export default IconLastRun;
