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

function IconSettingComponent(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-setting${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path fillRule="evenodd" d="M9.59.903a7.229 7.229 0 0 0-3.18 0l-.298.068-.932 2.124-2.294-.25-.207.225a7.273 7.273 0 0 0-1.59 2.765l-.091.29L2.363 8 1.177 9.629l-.179.245.09.29a7.274 7.274 0 0 0 1.59 2.766l.208.226 2.294-.251.809 1.844.123.28.299.068a7.225 7.225 0 0 0 3.178 0l.3-.067.931-2.125 2.295.25.207-.225a7.272 7.272 0 0 0 1.59-2.765l.09-.29L13.638 8l1.187-1.629.179-.246-.09-.29a7.273 7.273 0 0 0-1.59-2.765l-.208-.226-2.295.251L9.888.971 9.59.903ZM6.971 2.027a6.036 6.036 0 0 1 2.056 0l.747 1.703a.992.992 0 0 0 1.016.588l1.836-.201A6.06 6.06 0 0 1 13.66 5.91l-1.096 1.505a.992.992 0 0 0 0 1.168l1.096 1.505a6.06 6.06 0 0 1-1.032 1.794l-1.836-.2a.992.992 0 0 0-1.016.587l-.747 1.703a6.034 6.034 0 0 1-2.056 0l-.746-1.703a.992.992 0 0 0-1.017-.588l-1.836.201a6.06 6.06 0 0 1-1.032-1.794l1.097-1.505a.992.992 0 0 0 0-1.168L2.34 5.911a6.061 6.061 0 0 1 1.032-1.794l1.836.2a.992.992 0 0 0 1.017-.587l.746-1.703ZM8 4.97A3.025 3.025 0 0 1 11.02 8 3.025 3.025 0 0 1 8 11.03 3.025 3.025 0 0 1 4.982 8c0-1.673 1.35-3.03 3.018-3.03ZM6.194 8c0-1.005.81-1.818 1.806-1.818.998 0 1.807.813 1.807 1.818 0 1.005-.81 1.818-1.807 1.818A1.812 1.812 0 0 1 6.194 8Z" clipRule="evenodd"/></svg>;
}

const IconSetting = React.forwardRef(IconSettingComponent);
export default IconSetting;
