#pragma once
// ── Platform ─────────────────────────────────────────────────────────────────
// Small helpers for the places where one look does not fit both platforms.
//
// The goal is a SINGLE codebase that produces a native-feeling app on Windows
// and macOS. Where the two genuinely disagree, the difference is confined to
// this header rather than scattered through the UI as inline #ifdefs.
// ─────────────────────────────────────────────────────────────────────────────
#include <wx/wx.h>

namespace TD {

// Make a button read as the primary/call-to-action control.
//
// On Windows this paints it green with white bold text.
//
// On macOS it does NOTHING, deliberately. Cocoa's NSButton draws itself with
// the system appearance and ignores SetBackgroundColour -- you end up with the
// white text still applied over the unchanged grey background, which is close
// to illegible. A Mac button should look like a Mac button; fighting the
// platform for a green fill costs more than it is worth, and users on each
// platform expect their own conventions.
inline void StyleAsPrimary(wxButton* btn) {
    if (!btn) return;
#ifndef __WXOSX__
    btn->SetBackgroundColour(wxColour(20, 110, 20));
    btn->SetForegroundColour(*wxWHITE);
    wxFont f = btn->GetFont();
    f.SetPointSize(f.GetPointSize() + 2);
    f.SetWeight(wxFONTWEIGHT_EXTRABOLD);
    btn->SetFont(f);
#else
    // macOS: leave the native styling alone, but still give it some presence.
    wxFont f = btn->GetFont();
    f.SetWeight(wxFONTWEIGHT_BOLD);
    btn->SetFont(f);
#endif
}

} // namespace TD
