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

function IconSkipComponent(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-skip${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M2.97 19.95a.45.45 0 0 1 .45-.45h17.16a.45.45 0 0 1 .45.45v1.1a.45.45 0 0 1-.45.45H3.42a.45.45 0 0 1-.45-.45v-1.1ZM15.918 1.654l.046.042 4.95 4.95a.5.5 0 0 1 .042.66l-.041.047-4.95 4.95a.5.5 0 0 1-.66.042l-.047-.042-.708-.707a.499.499 0 0 1-.04-.66l.04-.047 2.889-2.89-.249.003c-2.867.037-5.154.581-7.083 1.631a10.627 10.627 0 0 0-4.392 4.473c-.164.31-.315.63-.452.96l-.057.138a23.14 23.14 0 0 0-.175.466.5.5 0 0 1-.47.33H3.5a.5.5 0 0 1-.475-.655l.054-.159c.246-.714.538-1.386.873-2.025a12.624 12.624 0 0 1 5.21-5.29C11.393 6.654 14.06 6.006 17.44 6l-2.89-2.889a.499.499 0 0 1-.04-.66l.04-.046.708-.708a.5.5 0 0 1 .609-.076l.051.034Z" clipRule="evenodd"/></svg>;
}

const IconSkip = React.forwardRef(IconSkipComponent);
export default IconSkip;
