'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 EvaluationConfigProps = { config: Record onChange: (config: Record) => void } export function EvaluationConfig({ config, onChange }: EvaluationConfigProps) { const update = (key: string, value: unknown) => { onChange({ ...config, [key]: value }) } const advancementMode = (config.advancementMode as string) ?? 'admin_selection' const advancementConfig = (config.advancementConfig as { perCategory?: boolean; startupCount?: number; conceptCount?: number; tieBreaker?: string }) ?? {} const updateAdvancement = (key: string, value: unknown) => { update('advancementConfig', { ...advancementConfig, [key]: value }) } return (
{/* Scoring */} Scoring & Reviews How jury members evaluate and score projects

Minimum number of jury evaluations needed

update('requiredReviewsPerProject', parseInt(e.target.value, 10) || 3)} />

How jurors assign scores to projects

How much of other jurors' identities are revealed

{/* Feedback */} Feedback Requirements What jurors must provide alongside scores

Jurors must write feedback text

update('requireFeedback', v)} />
{(config.requireFeedback as boolean) !== false && (

Minimum characters (0 = no minimum)

update('feedbackMinLength', parseInt(e.target.value, 10) || 0)} />
)}

Jurors must score every criterion before submitting

update('requireAllCriteriaScored', v)} />

Jurors must declare conflicts of interest

update('coiRequired', v)} />

Applicants must upload documents for this evaluation round (disable if documents were uploaded in a previous round)

update('requireDocumentUpload', v)} />

Allow jurors to see and comment on other evaluations

update('peerReviewEnabled', v)} />
{/* AI Features */} AI Features AI-powered evaluation assistance

Generate AI synthesis of all jury evaluations

update('aiSummaryEnabled', v)} />

AI suggests which projects should advance

update('generateAiShortlist', v)} />
{/* Advancement */} Advancement Rules How projects move to the next round
{advancementMode === 'auto_top_n' && (

Apply limits separately for each category

updateAdvancement('perCategory', v)} />

Number of startups to advance

updateAdvancement('startupCount', parseInt(e.target.value, 10) || 0)} />

Number of business concepts to advance

updateAdvancement('conceptCount', parseInt(e.target.value, 10) || 0)} />

How to handle tied scores

)}
) }