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

function IconSkillComponent(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-skill${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 18 18" {...rest} ref={ref}><path d="M6.05405 16.5H4.02703C3.48959 16.4995 2.97432 16.2857 2.5943 15.9057C2.21427 15.5257 2.00054 15.0104 2 14.473V12.4459H2.41892C3.01028 12.4459 3.57742 12.211 3.99558 11.7929C4.41373 11.3747 4.64865 10.8076 4.64865 10.2162C4.64865 9.62485 4.41373 9.05771 3.99558 8.63956C3.57742 8.2214 3.01028 7.98649 2.41892 7.98649H2V6.36486C2.00054 5.82743 2.21427 5.31216 2.5943 4.93213C2.97432 4.55211 3.48959 4.33837 4.02703 4.33784H6.05405V3.72973C6.05405 3.13837 6.28897 2.57123 6.70713 2.15307C7.12528 1.73492 7.69242 1.5 8.28378 1.5C8.87514 1.5 9.44229 1.73492 9.86044 2.15307C10.2786 2.57123 10.5135 3.13837 10.5135 3.72973V4.33784H12.1351C12.6726 4.33837 13.1878 4.55211 13.5679 4.93213C13.9479 5.31216 14.1616 5.82743 14.1622 6.36486V7.98649H14.7703C15.0631 7.98649 15.353 8.04416 15.6236 8.15621C15.8941 8.26827 16.1399 8.43251 16.3469 8.63956C16.554 8.84661 16.7182 9.09241 16.8303 9.36294C16.9423 9.63346 17 9.9234 17 10.2162C17 10.509 16.9423 10.799 16.8303 11.0695C16.7182 11.34 16.554 11.5858 16.3469 11.7929C16.1399 11.9999 15.8941 12.1642 15.6236 12.2762C15.353 12.3883 15.0631 12.4459 14.7703 12.4459H14.1622V14.473C14.1616 15.0104 13.9479 15.5257 13.5679 15.9057C13.1878 16.2857 12.6726 16.4995 12.1351 16.5H10.5135V16.0811C10.5135 15.7883 10.4558 15.4983 10.3438 15.2278C10.2317 14.9573 10.0675 14.7115 9.86044 14.5044C9.65339 14.2974 9.40759 14.1331 9.13706 14.0211C8.86654 13.909 8.5766 13.8514 8.28378 13.8514C7.99097 13.8514 7.70103 13.909 7.4305 14.0211C7.15998 14.1331 6.91418 14.2974 6.70713 14.5044C6.50008 14.7115 6.33584 14.9573 6.22378 15.2278C6.11173 15.4983 6.05405 15.7883 6.05405 16.0811V16.5Z"/></svg>;
}

const IconSkill = React.forwardRef(IconSkillComponent);
export default IconSkill;
