// ============= TWEAKS PANEL V2 =============
const TweaksPanel = ({ state, setState, onClose }) => {
const set = (k, v) => {
setState((s) => {
const next = { ...s, [k]: v };
try {
window.parent.postMessage({ type: '__edit_mode_set_keys', edits: { [k]: v } }, '*');
} catch {}
return next;
});
};
const Row = ({ label, children }) => (
set('palette', 'default')} swatchColors={['#2B7FFF','#FF6B35','#FFD23F']}>Crayola
set('palette', 'pastel')} swatchColors={['#FF7AC2','#A78BFA','#5FCFFF']}>Pastel
set('palette', 'jungla')} swatchColors={['#43A047','#FF7043','#FFB300']}>Jungla
set('density', 'comfy')}>Espacioso
set('density', 'compact')}>Compacto
set('countdown', true)}>Activo
set('countdown', false)}>Oculto
set('sticky', true)}>Activa
set('sticky', false)}>Oculta
Cambios se guardan automáticamente.
);
};
window.TweaksPanel = TweaksPanel;