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

function IconLocationComponent(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-location${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 25 25" {...rest} ref={ref}><path fillRule="evenodd" d="M12.1 24.2c6.683 0 12.1-5.417 12.1-12.1S18.783 0 12.1 0 0 5.417 0 12.1s5.417 12.1 12.1 12.1Zm-.1-2.6A9.6 9.6 0 0 1 2.4 12a9.6 9.6 0 1 1 19.2 0 9.6 9.6 0 0 1-9.6 9.6Zm0-7.2a2.4 2.4 0 1 0 0-4.8 2.4 2.4 0 0 0 0 4.8Z" clipRule="evenodd"/></svg>;
}

const IconLocation = React.forwardRef(IconLocationComponent);
export default IconLocation;
