type MarkerPhoto = {
  id: string;
  name: string;
  thumbUrl: string;
};

export function createPhotoMarkerIcon(leaflet: any, photo: MarkerPhoto, activePhotoId: string | null, escapeHtml: (value: unknown) => string) {
  const activeClass = photo.id === activePhotoId ? " active" : "";
  return leaflet.divIcon({
    className: "photo-map-marker" + activeClass,
    html:
      '<img src="' + escapeHtml(photo.thumbUrl) + '" alt="' + escapeHtml(photo.name) + '" />',
    iconSize: [44, 44],
    iconAnchor: [22, 22],
    popupAnchor: [0, -22]
  });
}
