// ============ GLOBAL RULES TAB ============
// Its own top-level nav page (sidebar item directly below Playbooks). CIT-504.
//
// History: this used to live inside the Playbooks tab, then got moved into
// Settings > Company (commit 1861854, "move Global Rules to Settings >
// Company, add KPI to Insights"). Per product direction, it's being split
// back out — this time as a standalone nav entry rather than folded into
// either Playbooks or Settings.
//
// LearningsSection (defined in knowledge.jsx, exposed as window.LearningsSection)
// is self-fetching — it calls /learnings directly regardless of what page
// renders it — so this wrapper only supplies the page chrome (heading +
// description) and defers all data/state to that component.
function GlobalRulesTab() {
  return (
    <div className="ef-page">
      <div className="st-pane" style={{ maxWidth: 640 }}>
        <div>
          <h2 className="st-pane-h">Global rules</h2>
          <p className="st-pane-s">
            Rules that apply to every agent — set by you, not learned from conversations. All agents follow these regardless of what they've learned.
          </p>
        </div>
        {typeof window.LearningsSection === "function" ? React.createElement(window.LearningsSection) : null}
      </div>
    </div>
  );
}

window.GlobalRulesTab = GlobalRulesTab;
