import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";
import { MODELS } from "@/lib/providers";

export function Settings({
  model,
  onModelChange,
}: {
  model: string;
  onModelChange: (model: string) => void;
}) {
  const handleModelChange = (newModel: string) => {
    onModelChange(newModel);
  };

  return (
    <Select value={model} onValueChange={handleModelChange}>
      <SelectTrigger className="bg-neutral-800 border-neutral-700 text-neutral-200 h-8 min-w-[180px]">
        <SelectValue placeholder="Select a model" />
      </SelectTrigger>
      <SelectContent className="bg-neutral-800 border-neutral-700">
        {MODELS.map((modelOption) => (
          <SelectItem 
            key={modelOption.value} 
            value={modelOption.value}
            className="text-neutral-200 hover:bg-neutral-700 focus:bg-neutral-700"
          >
            {modelOption.label}
          </SelectItem>
        ))}
      </SelectContent>
    </Select>
  );
}
