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

function IconRestartComponent(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-Restart${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="M1.33203 13.9987V10.6654C1.33203 10.2972 1.63051 9.9987 1.9987 9.9987H5.33203C5.70022 9.9987 5.9987 10.2972 5.9987 10.6654C5.9987 11.0336 5.70022 11.332 5.33203 11.332H3.60807L3.96875 11.6927L4.17578 11.8835C5.23151 12.8099 6.58917 13.3258 8 13.3314C9.41402 13.331 10.7703 12.7701 11.7702 11.7702C12.7704 10.77 13.332 9.41319 13.332 7.9987C13.332 7.63051 13.6305 7.33203 13.9987 7.33203C14.3669 7.33203 14.6654 7.63051 14.6654 7.9987C14.6654 9.76681 13.9631 11.4626 12.7129 12.7129C11.4626 13.9631 9.76681 14.6654 7.9987 14.6654H7.99609C6.14673 14.6584 4.37196 13.9364 3.04232 12.651L3.51497 12.1615L3.50521 12.1719L3.04232 12.651C3.03961 12.6484 3.03651 12.6459 3.03385 12.6432L2.66536 12.2747V13.9987C2.66536 14.3669 2.36689 14.6654 1.9987 14.6654C1.63051 14.6654 1.33203 14.3669 1.33203 13.9987ZM1.33203 7.9987C1.33203 6.23059 2.03426 4.53475 3.28451 3.28451C4.53475 2.03426 6.23059 1.33203 7.9987 1.33203H8.0013L8.347 1.3418C9.95596 1.42554 11.4902 2.04927 12.7012 3.11198L12.9635 3.35417L13.332 3.72266V1.9987C13.332 1.63051 13.6305 1.33203 13.9987 1.33203C14.3669 1.33203 14.6654 1.63051 14.6654 1.9987V5.33203C14.6654 5.70022 14.3669 5.9987 13.9987 5.9987H10.6654C10.2972 5.9987 9.9987 5.70022 9.9987 5.33203C9.9987 4.96384 10.2972 4.66536 10.6654 4.66536H12.3893L12.0286 4.30469L11.8216 4.11393C10.7657 3.18737 9.40781 2.67081 7.99674 2.66536C6.58296 2.66588 5.22695 3.22748 4.22721 4.22721C3.22702 5.22741 2.66536 6.58421 2.66536 7.9987C2.66536 8.36689 2.36689 8.66536 1.9987 8.66536C1.63051 8.66536 1.33203 8.36689 1.33203 7.9987Z"/><path d="M10.794 8.30871C11.0687 8.16413 11.0687 7.83587 10.794 7.69129L7.69254 6.05907C7.39355 5.90172 7 6.07715 7 6.36778V9.63222C7 9.92285 7.39355 10.0983 7.69254 9.94093L10.794 8.30871Z"/></svg>;
}

const IconRestart = React.forwardRef(IconRestartComponent);
export default IconRestart;
