/* ===== VLUE SALAMANCA — Tweaks for Carta de Vinos ===== */
/* Controls the new "California" wines (Little Boat). */

const VINOS_TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "chardB": "50€", "chardC": "6€",
  "pinotB": "58€", "pinotC": "8€",
  "cabB": "62€",  "cabC": "8€"
}/*EDITMODE-END*/;

function VinosTweaksApp() {
  const [t, setTweak] = useTweaks(VINOS_TWEAK_DEFAULTS);

  React.useEffect(() => {
    if (window.setVinosTweaks) window.setVinosTweaks(t);
  }, [t]);

  return (
    <TweaksPanel title="Tweaks">
      <TweakSection label="Little Boat — Chardonnay" />
      <TweakText label="Botella" value={t.chardB} onChange={(v) => setTweak('chardB', v)} />
      <TweakText label="Copa" value={t.chardC} onChange={(v) => setTweak('chardC', v)} />

      <TweakSection label="Little Boat — Pinot Noir" />
      <TweakText label="Botella" value={t.pinotB} onChange={(v) => setTweak('pinotB', v)} />
      <TweakText label="Copa" value={t.pinotC} onChange={(v) => setTweak('pinotC', v)} />

      <TweakSection label="Little Boat — Cabernet Sauvignon" />
      <TweakText label="Botella" value={t.cabB} onChange={(v) => setTweak('cabB', v)} />
      <TweakText label="Copa" value={t.cabC} onChange={(v) => setTweak('cabC', v)} />
    </TweaksPanel>
  );
}

ReactDOM.createRoot(document.getElementById('tweaksRoot')).render(<VinosTweaksApp />);
