/**
 * Language Selector Component
 *
 * Provides UI for switching between supported languages (English/German).
 * Uses shadcn/ui Select component.
 *
 * @author Andreas Weyer
 * @license MIT
 */

import React from 'react';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select';
import { Label } from './ui/label';

const LanguageSelector = ({ currentLanguage, onLanguageChange, t }: any) => {
  return (
    <div className="flex items-center gap-2">
      <Label className="text-sm font-medium">{t.language}:</Label>
      <Select value={currentLanguage} onValueChange={onLanguageChange}>
        <SelectTrigger className="w-32">
          <SelectValue />
        </SelectTrigger>
        <SelectContent>
          <SelectItem value="en">{t.english}</SelectItem>
          <SelectItem value="de">{t.german}</SelectItem>
        </SelectContent>
      </Select>
    </div>
  );
};

export default LanguageSelector;
