'use client'; import { Slider } from '@/components/ui/slider'; 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%' }, ]; const inputCls = 'w-full bg-transparent border border-border/40 rounded-lg px-3 py-1.5 text-xs font-mono outline-none focus:border-primary/50 transition-colors text-foreground/80 placeholder:text-muted-foreground/30'; export function QROptions({ errorCorrection, foregroundColor, backgroundColor, margin, onErrorCorrectionChange, onForegroundColorChange, onBackgroundColorChange, onMarginChange, }: QROptionsProps) { const isTransparent = backgroundColor === '#00000000'; return (