import { useState } from 'react' import { X, Upload } from 'lucide-react' import clsx from 'clsx' /** * Brand Kit editor modal * Props: { isOpen, onClose, clipId, jobId } */ function BrandKitEditor({ isOpen, onClose, clipId, jobId }) { const [primaryColor, setPrimaryColor] = useState('#E8A020') const [secondaryColor, setSecondaryColor] = useState('#FFB800') const [watermarkPos, setWatermarkPos] = useState('bottom-right') const [watermarkOpacity, setWatermarkOpacity] = useState(0.8) const [font, setFont] = useState('Inter') const [logoFile, setLogoFile] = useState(null) if (!isOpen) return null const positions = [ { id: 'top-left', label: 'TL', x: 'left', y: 'top' }, { id: 'top-center', label: 'T', x: 'center', y: 'top' }, { id: 'top-right', label: 'TR', x: 'right', y: 'top' }, { id: 'middle-left', label: 'L', x: 'left', y: 'center' }, { id: 'center', label: 'C', x: 'center', y: 'center' }, { id: 'middle-right', label: 'R', x: 'right', y: 'center' }, { id: 'bottom-left', label: 'BL', x: 'left', y: 'bottom' }, { id: 'bottom-center', label: 'B', x: 'center', y: 'bottom' }, { id: 'bottom-right', label: 'BR', x: 'right', y: 'bottom' }, ] const fonts = ['Inter', 'Poppins', 'Oswald', 'Montserrat', 'Roboto', 'Playfair Display'] const handleSave = () => { console.log({ primaryColor, secondaryColor, watermarkPos, watermarkOpacity, font, logoFile, }) onClose() } return ( <> {/* Overlay */}
{/* Modal */}
{/* Header */}

Brand Kit Editor

{/* Left Panel - Settings */}
{/* Logo Upload */}
{logoFile && (

Selected: {logoFile.name}

)}
{/* Primary Color */}
setPrimaryColor(e.target.value)} className="w-16 h-12 rounded-lg cursor-pointer border border-white/10" /> setPrimaryColor(e.target.value)} className="input-field flex-1 text-sm font-mono" placeholder="#E8A020" />
{/* Secondary Color */}
setSecondaryColor(e.target.value)} className="w-16 h-12 rounded-lg cursor-pointer border border-white/10" /> setSecondaryColor(e.target.value)} className="input-field flex-1 text-sm font-mono" placeholder="#FFB800" />
{/* Font */}
{/* Watermark Opacity */}
{Math.round(watermarkOpacity * 100)}%
setWatermarkOpacity(parseFloat(e.target.value))} className="w-full h-2 bg-white/10 rounded-full accent-primary-500" />
{/* Right Panel - Preview */}

Live Preview

{/* Gradient background based on colors */}
{/* Content */}
{/* Logo at top-left if watermarkPos involves top */} {(watermarkPos.includes('top') || watermarkPos.includes('center')) && (
)} {/* Center content */}

Your Brand

This is how your clips will look with your brand kit applied

{/* Watermark at bottom if positioned there */} {(watermarkPos.includes('bottom') || watermarkPos.includes('center')) && (
WATERMARK
)}
{/* Watermark Position */}

Watermark Position

{positions.map((pos) => ( ))}
{/* Actions */}
) } export default BrandKitEditor