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

function IconBarGavelComponent(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 || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-BarGavel${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 32 32" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M30.7673 14.2322L28.7673 12.2322C28.3965 11.8619 27.9188 11.6173 27.4016 11.5332C26.8843 11.4491 26.3537 11.5297 25.8848 11.7635L20.2348 6.11349C20.4687 5.64464 20.5495 5.11412 20.4656 4.59689C20.3817 4.07965 20.1374 3.60185 19.7673 3.23099L17.7673 1.23099C17.2984 0.762312 16.6627 0.499023 15.9998 0.499023C15.3368 0.499023 14.7011 0.762312 14.2323 1.23099L6.23225 9.23099C5.76358 9.69981 5.50029 10.3356 5.50029 10.9985C5.50029 11.6614 5.76358 12.2972 6.23225 12.766L8.23225 14.766C8.60181 15.1356 9.07791 15.38 9.5936 15.465C10.1093 15.55 10.6387 15.4712 11.1073 15.2397L3.66975 22.6722C2.91952 23.4225 2.49805 24.44 2.49805 25.501C2.49805 26.562 2.91952 27.5795 3.66975 28.3297C4.41998 29.08 5.43752 29.5014 6.4985 29.5014C7.55949 29.5014 8.57702 29.08 9.32725 28.3297L16.7498 20.901C16.5203 21.369 16.4429 21.8969 16.5283 22.4111C16.6137 22.9252 16.8576 23.3998 17.226 23.7685L19.226 25.7685C19.4582 26.0007 19.7338 26.185 20.0372 26.3107C20.3406 26.4364 20.6657 26.5011 20.9941 26.5011C21.3225 26.5011 21.6477 26.4364 21.9511 26.3107C22.2544 26.185 22.5301 26.0007 22.7623 25.7685L30.7623 17.7685C30.9945 17.5363 31.1787 17.2607 31.3044 16.9573C31.4301 16.6539 31.4948 16.3288 31.4948 16.0004C31.4948 15.672 31.4301 15.3468 31.3044 15.0434C31.1787 14.74 30.9945 14.4644 30.7623 14.2322H30.7673ZM9.99975 12.2922L8.70475 10.9997L15.9998 3.70599L17.2923 4.99974L9.99975 12.2922ZM7.20475 26.2085C7.01711 26.396 6.76268 26.5012 6.49744 26.5011C6.23219 26.501 5.97785 26.3955 5.79038 26.2079C5.6029 26.0202 5.49765 25.7658 5.49776 25.5005C5.49788 25.2353 5.60336 24.981 5.791 24.7935L13.231 17.3535L14.6448 18.7685L7.20475 26.2085ZM18.7923 18.6722L13.3273 13.2072L18.2023 8.33224L23.6673 13.7972L18.7923 18.6722ZM20.9985 23.2972L19.706 21.9997L26.9998 14.7072L28.2923 15.9997L20.9985 23.2972Z"/></svg>;
}

const IconBarGavel = React.forwardRef(IconBarGavelComponent);
export default IconBarGavel;
