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

function IconPinFillComponent(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-pin-fill${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M26.422 4.015c.395-.4 1.037-.4 1.433 0L43.42 19.579c.396.4.396 1.04 0 1.43l-1.4 1.407c-.395.39-1.037.39-1.433 0l-2.121-2.122-6.402 6.4c-.19.19-.24.506-.24.766l-.884 12.607c0 .27-.107.53-.297.72l-1.853 1.85c-.396.4-1.037.4-1.433 0l-9.863-9.857L7.464 42.81c-.396.39-1.037.39-1.433 0l-1.433-1.44a1.01 1.01 0 010-1.43l10.03-10.03-9.879-9.882a1.01 1.01 0 010-1.43l1.853-1.85c.19-.19.448-.3.717-.3l12.622-.868c.269 0 .612-.025.802-.215l6.401-6.4-2.122-2.123a1.01 1.01 0 010-1.43l1.4-1.397z"/></svg>;
}

const IconPinFill = React.forwardRef(IconPinFillComponent);
export default IconPinFill;
