({
open,
onOpenChange,
format,
onFormatChange,
exportMode,
onExportModeChange,
targetLanguage,
onTargetLanguageChange,
includeSpeakers,
onIncludeSpeakersChange,
includeTimestamps,
onIncludeTimestampsChange,
disableTimestampToggle = false,
onConfirm,
isExporting,
error,
disableDownloadMessage,
hasSpeakerData = false,
willConsumeTopup = false,
videoTitle,
translationProgress,
}: TranscriptExportDialogProps)
| 94 | ]; |
| 95 | |
| 96 | export function TranscriptExportDialog({ |
| 97 | open, |
| 98 | onOpenChange, |
| 99 | format, |
| 100 | onFormatChange, |
| 101 | exportMode, |
| 102 | onExportModeChange, |
| 103 | targetLanguage, |
| 104 | onTargetLanguageChange, |
| 105 | includeSpeakers, |
| 106 | onIncludeSpeakersChange, |
| 107 | includeTimestamps, |
| 108 | onIncludeTimestampsChange, |
| 109 | disableTimestampToggle = false, |
| 110 | onConfirm, |
| 111 | isExporting, |
| 112 | error, |
| 113 | disableDownloadMessage, |
| 114 | hasSpeakerData = false, |
| 115 | willConsumeTopup = false, |
| 116 | videoTitle, |
| 117 | translationProgress, |
| 118 | }: TranscriptExportDialogProps) { |
| 119 | const title = videoTitle ? `Export ${videoTitle}` : "Export transcript"; |
| 120 | |
| 121 | return ( |
| 122 | <Dialog open={open} onOpenChange={onOpenChange}> |
| 123 | <DialogContent className="sm:max-w-lg max-h-[90vh] overflow-y-auto"> |
| 124 | <DialogHeader> |
| 125 | <DialogTitle className="flex items-center gap-2"> |
| 126 | <Download className="h-5 w-5" /> |
| 127 | {title} |
| 128 | </DialogTitle> |
| 129 | <DialogDescription className="pt-1 text-sm text-muted-foreground"> |
| 130 | Choose a format that fits your workflow. We’ll prep the file instantly. |
| 131 | </DialogDescription> |
| 132 | </DialogHeader> |
| 133 | |
| 134 | <div className="space-y-6"> |
| 135 | {/* Format Selection */} |
| 136 | <div className="space-y-3"> |
| 137 | <h4 className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"> |
| 138 | Format |
| 139 | </h4> |
| 140 | <RadioGroup value={format} onValueChange={(value) => onFormatChange(value as TranscriptExportFormat)} className="space-y-3"> |
| 141 | {formatOptions.map((option) => ( |
| 142 | <div |
| 143 | key={option.value} |
| 144 | className="flex items-start gap-3 rounded-2xl border border-muted bg-card/60 p-4 transition hover:border-muted-foreground/20" |
| 145 | > |
| 146 | <RadioGroupItem id={`export-format-${option.value}`} value={option.value} className="mt-1" /> |
| 147 | <Label htmlFor={`export-format-${option.value}`} className="grow cursor-pointer"> |
| 148 | <div className="text-sm font-semibold text-foreground">{option.title}</div> |
| 149 | <p className="text-xs text-muted-foreground pt-1">{option.description}</p> |
| 150 | </Label> |
| 151 | </div> |
| 152 | ))} |
| 153 | </RadioGroup> |
nothing calls this directly
no outgoing calls
no test coverage detected