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

function IconPinFilledComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-pin-filled${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M8.16221 1.26878C8.42222 1.00877 8.83551 0.970395 9.12999 1.26488L14.4991 6.63402C14.7536 6.88859 14.7916 7.30732 14.5011 7.59788C14.3235 7.77529 13.8913 7.91088 13.5567 7.5764L12.7569 6.78245L10.6231 8.91624C10.56 8.97951 10.5431 9.0846 10.5431 9.17113L10.2491 13.3733C10.2491 13.4633 10.2128 13.5502 10.1495 13.6135L9.77061 13.9924C9.50711 14.2568 9.08161 14.2575 8.82237 13.9983L5.7667 10.9446L2.65733 14.0539C2.39698 14.3143 1.97431 14.3143 1.71397 14.0539L1.7042 14.0442C1.4442 13.784 1.44343 13.3622 1.70323 13.1018L4.81163 9.98851L1.75596 6.93187C1.48578 6.66161 1.49307 6.24271 1.75694 5.97874L2.13584 5.60081C2.19921 5.53748 2.28554 5.5012 2.3751 5.5012L6.58213 5.21116C6.67179 5.21116 6.7864 5.20319 6.84971 5.13988L8.9835 3.00609L8.18663 2.20726C7.93347 1.95662 7.91076 1.52064 8.16221 1.26878Z"/></svg>;
}

const IconPinFilled = React.forwardRef(IconPinFilledComponent);
export default IconPinFilled;
