import { Film, Image } from "lucide-react"; import { useScopedT } from "@/contexts/I18nContext"; import type { ExportFormat } from "@/lib/exporter/types"; import { cn } from "@/lib/utils"; interface FormatSelectorProps { selectedFormat: ExportFormat; onFormatChange: (format: ExportFormat) => void; disabled?: boolean; } const formatOptions: Array<{ value: ExportFormat; icon: React.ReactNode }> = [ { value: "mp4", icon: }, { value: "gif", icon: }, ]; export function FormatSelector({ selectedFormat, onFormatChange, disabled = false, }: FormatSelectorProps) { const t = useScopedT("settings"); const formatLabels: Record = { mp4: { label: t("exportFormat.mp4Video"), description: t("exportFormat.mp4Description") }, gif: { label: t("exportFormat.gifAnimation"), description: t("exportFormat.gifDescription") }, }; return (
{formatOptions.map((option) => { const isSelected = selectedFormat === option.value; const labels = formatLabels[option.value]; return ( ); })}
); }