import { useState, useMemo } from 'react';

export function useBatchFilter(allBatchIds: string[]) {
  const [selectedBatch, setSelectedBatch] = useState<string>('all');

  const uniqueBatches = useMemo(() => [...new Set(allBatchIds)], [allBatchIds]);

  return { selectedBatch, setSelectedBatch, uniqueBatches };
}
