import React from 'react';

import { ReactComponent as Filled } from '../../svg/LocationOn/icon-fill.svg';
import { ReactComponent as Outlined } from '../../svg/LocationOn/icon.svg';
import { defaultIconProps } from '../common';
import type { IconPropsReact } from '../types';

const name = 'location_on';

export function LocationOn(props: IconPropsReact) {
  const { variant, ...restProps } = {
    ...defaultIconProps,
    ...props,
  };
  const IconComponent = variant === 'outlined' ? Outlined : Filled;

  const overrides = props.size ? { width: props.size, height: props.size } : {};

  return <IconComponent aria-label={name} {...restProps} {...overrides} />;
}

export default LocationOn;
