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

function IconShieldComponent(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-shield${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 d="M7.53931 1.07046C7.8812 0.961196 8.25315 0.978942 8.58521 1.12417L13.3098 3.19253L13.4094 3.24038C13.86 3.4788 14.157 3.93288 14.1946 4.44156L14.1985 4.55191C14.1983 5.26335 14.1985 6.44289 14.1985 6.65835C14.1984 9.08128 13.4378 10.7427 12.4211 12.0744L12.2141 12.3361C11.2719 13.4949 9.9832 14.3932 8.68384 14.8908L8.42407 14.9845C8.14863 15.0785 7.84317 15.0856 7.55493 14.9865C6.95246 14.7792 5.37487 14.1295 4.03149 12.631L3.76587 12.3195C2.32832 10.5438 1.80108 8.79424 1.80103 6.54116C1.80103 6.08869 1.80061 5.2268 1.80005 4.55093C1.79959 3.96179 2.14817 3.42911 2.68677 3.19253L7.39478 1.12515L7.53931 1.07046ZM7.95337 2.30386L7.91724 2.31558L3.20923 4.38296C3.14249 4.41234 3.09979 4.47789 3.09985 4.54995C3.10041 5.22427 3.10181 6.08807 3.10181 6.54116C3.10186 8.53563 3.54947 9.98641 4.77661 11.5021L5.00024 11.7648C6.13717 13.0322 7.48299 13.5864 7.97876 13.757L7.98657 13.758C7.99024 13.7579 7.9965 13.7567 8.00415 13.7541L8.22192 13.6759C9.31306 13.2576 10.4112 12.4924 11.2053 11.5158L11.3831 11.2912C12.2559 10.1505 12.8986 8.75732 12.8987 6.65835C12.8987 6.44265 12.8985 5.26219 12.8987 4.55093L12.8909 4.4982C12.8756 4.44783 12.8393 4.40491 12.7893 4.38296L8.0647 2.31558C8.02954 2.30019 7.99034 2.29616 7.95337 2.30386ZM9.81274 6.07046C9.97535 5.90822 10.239 5.90827 10.4016 6.07046L10.7092 6.37808C10.8719 6.54078 10.8719 6.8052 10.7092 6.96792L7.67505 10.0011C7.59352 10.0827 7.48698 10.1224 7.38013 10.1222C7.27368 10.1221 7.1674 10.0823 7.08618 10.0011L5.28833 8.20425C5.12617 8.04158 5.12604 7.77797 5.28833 7.61538L5.59595 7.30777C5.75856 7.1452 6.02306 7.14539 6.18579 7.30777L7.38013 8.5021L9.81274 6.07046Z"/></svg>;
}

const IconShield = React.forwardRef(IconShieldComponent);
export default IconShield;
