"use client"; import { Map, Moon, Satellite, TreePine } from "lucide-react"; import { Button } from "@/shared/components/ui/button"; import { cn } from "@/shared/lib/utils"; import type { BasemapId } from "../types"; const BASEMAPS: { id: BasemapId; label: string; icon: typeof Map }[] = [ { id: "liberty", label: "Harta", icon: Map }, { id: "dark", label: "Dark", icon: Moon }, { id: "google", label: "Satelit", icon: Satellite }, { id: "satellite", label: "ESRI", icon: Satellite }, { id: "orto", label: "ANCPI", icon: TreePine }, ]; type BasemapSwitcherProps = { value: BasemapId; onChange: (id: BasemapId) => void; }; export function BasemapSwitcher({ value, onChange }: BasemapSwitcherProps) { return (
{BASEMAPS.map((b) => { const Icon = b.icon; const active = value === b.id; return ( ); })}
); }