// tweaks-panel.jsx — PRODUCTION STUB
//
// The design bundle ships a floating "Tweaks" editor panel used inside
// Claude Design (claude.ai/design). In production we keep the useTweaks
// hook (so the language/theme/accent defaults still drive the page) but
// render NO visible editor chrome. All Tweak* controls become no-ops.
//
// Default state comes from TWEAK_DEFAULTS in app.jsx:
//   { lang: "ko", theme: "light", accent: "#A26F3E", density: "regular" }
// The footer KO/EN toggle still works because it calls setTweak('lang', v).

function useTweaks(defaults) {
  const [values, setValues] = React.useState(defaults);
  const setTweak = React.useCallback((keyOrEdits, val) => {
    const edits =
      typeof keyOrEdits === "object" && keyOrEdits !== null
        ? keyOrEdits
        : { [keyOrEdits]: val };
    setValues((prev) => ({ ...prev, ...edits }));
  }, []);
  return [values, setTweak];
}

// All editor-chrome components render nothing in production.
function TweaksPanel() { return null; }
function TweakSection() { return null; }
function TweakRow() { return null; }
function TweakSlider() { return null; }
function TweakToggle() { return null; }
function TweakRadio() { return null; }
function TweakSelect() { return null; }
function TweakText() { return null; }
function TweakNumber() { return null; }
function TweakColor() { return null; }
function TweakButton() { return null; }

Object.assign(window, {
  useTweaks, TweaksPanel, TweakSection, TweakRow,
  TweakSlider, TweakToggle, TweakRadio, TweakSelect,
  TweakText, TweakNumber, TweakColor, TweakButton,
});
