import { ChevronDown } from 'lucide-react'; import type { Environment } from '../api/queries/admin/environments'; import { envColorVar } from './env-colors'; import styles from './EnvironmentSwitcherButton.module.css'; interface EnvironmentSwitcherButtonProps { envs: Environment[]; value: string | undefined; onClick: () => void; } export function EnvironmentSwitcherButton({ envs, value, onClick }: EnvironmentSwitcherButtonProps) { const current = envs.find((e) => e.slug === value); const displayName = current?.displayName ?? value ?? 'Select environment'; const color = envColorVar(current?.color); return ( ); }