'use client'; import { SliderRow } from '@/components/ui/slider-row'; import { ColorInput } from '@/components/ui/color-input'; import { cn } from '@/lib/utils/cn'; import type { ErrorCorrectionLevel } from '@/types/qrcode'; interface QROptionsProps { errorCorrection: ErrorCorrectionLevel; foregroundColor: string; backgroundColor: string; margin: number; onErrorCorrectionChange: (ec: ErrorCorrectionLevel) => void; onForegroundColorChange: (color: string) => void; onBackgroundColorChange: (color: string) => void; onMarginChange: (margin: number) => void; } const EC_OPTIONS: { value: ErrorCorrectionLevel; label: string; desc: string }[] = [ { value: 'L', label: 'L', desc: '7%' }, { value: 'M', label: 'M', desc: '15%' }, { value: 'Q', label: 'Q', desc: '25%' }, { value: 'H', label: 'H', desc: '30%' }, ]; export function QROptions({ errorCorrection, foregroundColor, backgroundColor, margin, onErrorCorrectionChange, onForegroundColorChange, onBackgroundColorChange, onMarginChange, }: QROptionsProps) { const isTransparent = backgroundColor === '#00000000'; return (