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

function IconSortingModelComponent(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-sorting-model${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 14 14" {...rest} ref={ref}><path fillRule="evenodd" d="M12.542 2.042c0 .16-.13.291-.292.291H2.625v10.5c0 .162-.13.292-.292.292H1.75a.292.292 0 0 1-.292-.292V1.458c0-.16.131-.291.292-.291h10.5c.161 0 .292.13.292.291v.584ZM7.583 5.25c0 .161-.13.292-.291.292h-3.5A.292.292 0 0 1 3.5 5.25v-.583c0-.161.13-.292.292-.292h3.5c.16 0 .291.13.291.292v.583Zm2.042 3.208c0 .162-.13.292-.292.292H3.792a.292.292 0 0 1-.292-.292v-.583c0-.161.13-.292.292-.292h5.541c.162 0 .292.131.292.292v.583Zm2.042 3.209c0 .16-.13.291-.292.291H3.792a.292.292 0 0 1-.292-.291v-.584c0-.16.13-.291.292-.291h7.583c.161 0 .292.13.292.291v.584Z" clipRule="evenodd"/></svg>;
}

const IconSortingModel = React.forwardRef(IconSortingModelComponent);
export default IconSortingModel;
