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

function IconSwipeComponent(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-swipe${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M5 2h24a2 2 0 011.994 1.85L31 4v40a2 2 0 01-1.85 1.995L29 46H5a2 2 0 01-1.995-1.85L3 44V4a2 2 0 011.85-1.995L5 2h24H5zm22 4H7v36h20V6zm10 3a1 1 0 011 1v30a1 1 0 01-1 1h-2a1 1 0 01-1-1V10a1 1 0 011-1h2zm7 5a1 1 0 011 1v20a1 1 0 01-1 1h-2a1 1 0 01-1-1V15a1 1 0 011-1h2z"/></svg>;
}

const IconSwipe = React.forwardRef(IconSwipeComponent);
export default IconSwipe;
