using System;
using Cthangover.Core.UI.Theming;
using Cthangover.Mods.Interface.Theming;
using Godot;
namespace Cthangover.BaseMenu
{
///
/// The look of the menu windows (settings, save browser, game picker) — the
/// style guide's panel shell: a 0.9 backdrop, the window frame, a header
/// with the caps title on the left and the ✕ on the right, 1px rules around
/// the body and a footer with a faint hint. The node layout lives in each
/// window's scene under the same names (Backdrop, Window/Column/…),
/// this class only paints it, so the three windows cannot drift apart.
///
public static class MenuWindowShell
{
/// Header row: Title, optional controls, CloseButton.
public const string Header = "Window/Column/Header/Row/";
/// Body container of the window.
public const string Body = "Window/Column/Body/";
/// Footer row: Hint and optional buttons.
public const string Footer = "Window/Column/Footer/Row/";
///
/// Paints the shell of and wires its close button to
/// ; the title, the close tooltip and the footer
/// hint keep their texts (callers translate them).
///
public static void Style(Control root, Action close)
{
CthangoverTheme.Apply(root);
root.GetNode("Backdrop").Color = UiTokens.Backdrop;
root.GetNode("Window").AddThemeStyleboxOverride("panel", UiKit.Frame(UiTokens.RadiusLg, UiTokens.Surface0, UiTokens.Line));
root.GetNode("Window/Column/RuleHeader").Color = UiTokens.Line;
root.GetNode("Window/Column/RuleFooter").Color = UiTokens.Line;
var title = root.GetNode