'use client';

import { Card } from '@/components/ui/card';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';

interface FieldFilterProps {
  selectedField: string;
  onFieldChange: (value: string) => void;
}

export function FieldFilter({ selectedField, onFieldChange }: FieldFilterProps) {
  return (
    <Card className="p-4 bg-card">
      <div className="flex items-center gap-4">
        <label className="text-sm font-medium">筛选地块:</label>
        <Select value={selectedField} onValueChange={onFieldChange}>
          <SelectTrigger className="w-64">
            <SelectValue />
          </SelectTrigger>
          <SelectContent>
            <SelectItem value="all">全部地块</SelectItem>
            <SelectItem value="field-1">东区1号地</SelectItem>
            <SelectItem value="field-2">西区2号地</SelectItem>
            <SelectItem value="field-3">南区3号地</SelectItem>
            <SelectItem value="field-4">北区4号地</SelectItem>
          </SelectContent>
        </Select>
      </div>
    </Card>
  );
}