import type { Map3DSettings } from "../../widgets/map3d/Map3D";

type Props = {
  value: Map3DSettings;
  onToggle: (key: keyof Map3DSettings) => void;
};

export function Map3DSettingsToggles({ value, onToggle }: Props) {
  const items: Array<{ id: keyof Map3DSettings; label: string }> = [
    { id: "showShips", label: "선박(Deck)" },
    { id: "showDensity", label: "밀도(3D)" },
    { id: "showSeamark", label: "OpenSeaMap" },
  ];

  return (
    <div className="tog">
      {items.map((t) => (
        <div key={t.id} className={`tog-btn ${value[t.id] ? "on" : ""}`} onClick={() => onToggle(t.id)}>
          {t.label}
        </div>
      ))}
    </div>
  );
}
