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

function IconSelectComponent(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-select${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 d="M11.66 5.72 2.99.712a.532.532 0 0 0-.63.074.508.508 0 0 0-.16.385v10.016c0 .139.064.278.16.374.107.096.235.15.374.15a.541.541 0 0 0 .352-.14l2.072-2.007 1.772 3.075a1 1 0 0 0 1.357.374l1.9-1.1a.996.996 0 0 0 .363-1.356L8.778 7.471l2.765-.8a.523.523 0 0 0 .117-.95Zm-3.822.929c-.043.01-.075.032-.117.053a.536.536 0 0 0-.193.716l2.083 3.609-1.805 1.036-2.072-3.599a.53.53 0 0 0-.384-.267h-.075a.509.509 0 0 0-.363.15L3.246 9.948v-7.87l6.813 3.94-2.221.63Z"/><path fillRule="evenodd" d="M3.028.647 11.7 5.655a.6.6 0 0 1 .219.806.583.583 0 0 1-.356.281l-2.673.774 1.725 3.003c.3.507.114 1.16-.39 1.458l-1.9 1.1a1.07 1.07 0 0 1-.53.139c-.38 0-.735-.207-.93-.539L5.142 9.685l-2.005 1.942a.616.616 0 0 1-.402.158.628.628 0 0 1-.424-.169l-.003-.002a.619.619 0 0 1-.182-.427V1.17c0-.167.06-.327.184-.44a.608.608 0 0 1 .719-.084Zm0 0L2.99.71Zm-.075.13A.457.457 0 0 0 2.41.84v.001a.433.433 0 0 0-.136.329v10.016c0 .116.054.236.137.32a.477.477 0 0 0 .322.128.466.466 0 0 0 .301-.119l2.14-2.073 1.82 3.158a.934.934 0 0 0 .8.465.92.92 0 0 0 .454-.118l1.9-1.1a.921.921 0 0 0 .337-1.253l-1.82-3.17 2.86-.828a.433.433 0 0 0 .261-.209.448.448 0 0 0-.164-.604L2.953.776Zm.218 1.171 7.08 4.094-2.395.68a.254.254 0 0 0-.062.026l-.037.02a.461.461 0 0 0-.163.612l2.12 3.674-1.936 1.11L5.668 8.5a.456.456 0 0 0-.323-.227h-.07a.434.434 0 0 0-.31.127L3.17 10.124V1.948Zm.15.26v7.564L4.86 8.293a.585.585 0 0 1 .416-.171h.085a.606.606 0 0 1 .44.305l2.034 3.533L9.508 11 7.463 7.455a.612.612 0 0 1 .219-.817l.005-.003a.483.483 0 0 1 .132-.059l2.05-.581L3.32 2.208Z" clipRule="evenodd"/></svg>;
}

const IconSelect = React.forwardRef(IconSelectComponent);
export default IconSelect;
