import {L, Icon} from 'leaflet';
import ms from 'milsymbol'

const iconShip = new Icon({
  iconUrl: "./ship.svg",
  iconSize: [50, 50],
  // iconAnchor: [40, 90],
  popupAnchor: [-25, -40],
});

const iconSize = {
  "Team/Crew": 5,
  "Squad": 10,
  "Section": 15,
  "Platoon/detachment": 20,
  "Company/battery/troop": 25,
  "Battalion/squadron": 30,
  "Regiment/group": 35,
  "Brigade": 40,
  "Division": 45,
  "Corps/MEF": 50,
  "Army": 55,
  "Army Group/front": 60,
  "Region/Theater": 65,
  "Command": 70
};

var Friend = new ms.Symbol(
  "SFP---------", {
    uniqueDesignation: "Friend"
  })
// Now that we have a symbol we can ask for the echelon and set the symbol size
Friend = Friend.setOptions({ size: 25 });

const friend = new Icon({
  iconUrl: Friend.toDataURL(),
  iconAnchor: [Friend.getAnchor().x, Friend.getAnchor().y],
});


var hostile = new ms.Symbol(
  "SHP---------", {
    uniqueDesignation: "Hostile"
  })
// Now that we have a symbol we can ask for the echelon and set the symbol size
hostile = hostile.setOptions({ size: 25 });

const Hostile = new Icon({
  iconUrl: hostile.toDataURL(),
  iconAnchor: [hostile.getAnchor().x, hostile.getAnchor().y],
});

export { iconShip, friend,Hostile };