"use client";
import React from "react";
import { Planet } from "@/types/swapi";
import { t } from "@/content/locales"; // Import der Locales
interface GalaxyMapProps {
planets: Planet[];
onSelectLocation: (planet: Planet) => void;
currentLocationId?: string;
}
export default function GalaxyMap({
planets,
onSelectLocation,
currentLocationId,
}: GalaxyMapProps) {
return (
{/* Hintergrund-Raster (Grid) */}
{/* Die Planeten (Nodes) aus der API */}
{planets.map((planet) => {
const isCurrent = planet.id === currentLocationId;
return (
);
})}
{/* Scan-Linie Effekt */}
{/* Info Overlay */}
{t.GALAXY_MAP.SCAN_STATUS}
{t.GALAXY_MAP.OBJECTS_DETECTED(planets.length)}
{t.GALAXY_MAP.HOLONET_STATUS}
);
}