/** * BackgroundSettingsEditor Component * * Compact editor for background image, video, or audio settings. * Used in the element editor panel for background menu items. */ import React from 'react'; import type { AssetOption } from './types'; import { addFallbackAssetOption } from '../../lib/constructorHelpers'; interface BackgroundSettingsEditorProps { type: 'image' | 'video' | 'audio'; value: string; options: AssetOption[]; durationNote?: string; onChange: (value: string) => void; onClearImage?: () => void; } const LABELS: Record = { image: 'Background image', video: 'Background video', audio: 'Background audio (loop)', }; const BackgroundSettingsEditor: React.FC = ({ type, value, options, durationNote, onChange, onClearImage, }) => { const label = LABELS[type] || 'Background'; const selectOptions = addFallbackAssetOption( options, value, `Current ${type} ยท ${value}`, ); return (
{durationNote && (

{durationNote}

)}
); }; export default BackgroundSettingsEditor;