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

function IconGavelComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-Gavel${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 49 48" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path opacity=".2" d="M28.5612 8.56127L16.5612 20.5613C16.4219 20.7007 16.2565 20.8114 16.0744 20.8869C15.8923 20.9623 15.6971 21.0012 15.5 21.0012C15.3028 21.0012 15.1076 20.9623 14.9255 20.8869C14.7435 20.8114 14.578 20.7007 14.4387 20.5613L11.4387 17.5613C11.2992 17.422 11.1886 17.2565 11.1131 17.0744C11.0376 16.8923 10.9988 16.6971 10.9988 16.5C10.9988 16.3029 11.0376 16.1077 11.1131 15.9256C11.1886 15.7435 11.2992 15.5781 11.4387 15.4388L23.4387 3.43877C23.578 3.29931 23.7435 3.18867 23.9255 3.11318C24.1076 3.03769 24.3028 2.99884 24.5 2.99884C24.6971 2.99884 24.8923 3.03769 25.0744 3.11318C25.2565 3.18867 25.4219 3.29931 25.5612 3.43877L28.5612 6.43877C28.7007 6.57808 28.8113 6.74351 28.8868 6.92561C28.9623 7.10771 29.0011 7.3029 29.0011 7.50002C29.0011 7.69714 28.9623 7.89233 28.8868 8.07443C28.8113 8.25653 28.7007 8.42196 28.5612 8.56127ZM45.0612 22.9388L42.0612 19.9388C41.9219 19.7993 41.7565 19.6887 41.5744 19.6132C41.3923 19.5377 41.1971 19.4988 41 19.4988C40.8028 19.4988 40.6076 19.5377 40.4256 19.6132C40.2435 19.6887 40.078 19.7993 39.9387 19.9388L27.9387 31.9388C27.7992 32.0781 27.6886 32.2435 27.6131 32.4256C27.5376 32.6077 27.4988 32.8029 27.4988 33C27.4988 33.1971 27.5376 33.3923 27.6131 33.5744C27.6886 33.7565 27.7992 33.922 27.9387 34.0613L30.9387 37.0613C31.078 37.2007 31.2435 37.3114 31.4255 37.3869C31.6076 37.4623 31.8028 37.5012 32 37.5012C32.1971 37.5012 32.3923 37.4623 32.5744 37.3869C32.7565 37.3114 32.9219 37.2007 33.0612 37.0613L45.0612 25.0613C45.2007 24.922 45.3113 24.7565 45.3868 24.5744C45.4623 24.3923 45.5011 24.1971 45.5011 24C45.5011 23.8029 45.4623 23.6077 45.3868 23.4256C45.3113 23.2435 45.2007 23.0781 45.0612 22.9388Z" fill={useCurrentColor ? 'currentColor' : '#000'}/><path d="M46.1225 21.8798L43.1225 18.8798C42.6137 18.3716 41.9393 18.0631 41.2221 18.0104C40.5049 17.9577 39.7926 18.1645 39.215 18.5929L29.9075 9.28545C30.3362 8.70809 30.5433 7.99596 30.491 7.27875C30.4387 6.56154 30.1305 5.88698 29.6225 5.37795L26.6225 2.37795C26.344 2.0993 26.0132 1.87826 25.6492 1.72745C25.2852 1.57664 24.895 1.49902 24.501 1.49902C24.107 1.49902 23.7168 1.57664 23.3528 1.72745C22.9887 1.87826 22.658 2.0993 22.3794 2.37795L10.3794 14.3779C10.1008 14.6565 9.87973 14.9873 9.72892 15.3513C9.57812 15.7153 9.5005 16.1055 9.5005 16.4995C9.5005 16.8935 9.57812 17.2837 9.72892 17.6477C9.87973 18.0117 10.1008 18.3425 10.3794 18.6211L13.3794 21.6211C13.8883 22.1285 14.5625 22.4364 15.2793 22.4887C15.9961 22.541 16.7078 22.3343 17.285 21.9061L18.6294 23.2504L6.37067 35.5092C5.55624 36.3999 5.11677 37.5704 5.14375 38.7771C5.17073 39.9837 5.66209 41.1334 6.51552 41.9868C7.36894 42.8403 8.51866 43.3316 9.72529 43.3586C10.9319 43.3856 12.1024 42.9461 12.9932 42.1317L25.25 29.8729L26.5944 31.2154C26.1657 31.7928 25.9587 32.5049 26.011 33.2221C26.0633 33.9394 26.3715 34.6139 26.8794 35.1229L29.8794 38.1229C30.158 38.4016 30.4888 38.6226 30.8528 38.7734C31.2168 38.9242 31.607 39.0019 32.001 39.0019C32.395 39.0019 32.7852 38.9242 33.1492 38.7734C33.5132 38.6226 33.844 38.4016 34.1225 38.1229L46.1225 26.1229C46.4012 25.8444 46.6222 25.5136 46.773 25.1496C46.9238 24.7856 47.0015 24.3954 47.0015 24.0014C47.0015 23.6074 46.9238 23.2172 46.773 22.8532C46.6222 22.4892 46.4012 22.1584 46.1225 21.8798ZM15.5 19.5004L12.5 16.5004L24.5 4.50045L27.5 7.50045L15.5 19.5004ZM10.8725 40.0092C10.5564 40.3235 10.1287 40.4999 9.68286 40.4999C9.23704 40.4999 8.80934 40.3235 8.49317 40.0092C8.17944 39.6931 8.00339 39.2658 8.00339 38.8204C8.00339 38.3751 8.17944 37.9478 8.49317 37.6317L20.75 25.3729L23.1294 27.7504L10.8725 40.0092ZM19.4375 19.8117L27.8113 11.4379L37.0625 20.6892L28.6907 29.0629L19.4375 19.8117ZM32 36.0004L29 33.0004L29.75 32.2504L40.25 21.7504L41 21.0004L44 24.0004L32 36.0004Z" fill={useCurrentColor ? 'currentColor' : '#000'}/></svg>;
}

const IconGavel = React.forwardRef(IconGavelComponent);
export default IconGavel;
