'use client' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Switch } from '@/components/ui/switch' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' type DeliberationConfigProps = { config: Record onChange: (config: Record) => void juryGroups?: Array<{ id: string; name: string }> } export function DeliberationConfig({ config, onChange, juryGroups }: DeliberationConfigProps) { const update = (key: string, value: unknown) => { onChange({ ...config, [key]: value }) } return (
{/* Jury Group Selection */} Deliberation Jury Which jury group participates in this deliberation round

The jury group that will cast votes during deliberation

{juryGroups && juryGroups.length > 0 ? ( ) : ( update('juryGroupId', e.target.value)} /> )}
{/* Voting Settings */} Voting Settings How deliberation votes are structured

How the final decision is made

Time limit for voting round

update('votingDuration', parseInt(e.target.value, 10) || 60)} />

Number of finalists to select

update('topN', parseInt(e.target.value, 10) || 3)} />
{/* Visibility & Overrides */} Visibility & Overrides What information jurors can see during deliberation

Display aggregate rankings to jurors during voting

update('showCollectiveRankings', v)} />

Display evaluation scores from previous rounds

update('showPriorJuryData', v)} />

Admin can override deliberation results

update('allowAdminOverride', v)} />
) }