import { d as attr_class, f as stringify, h as store_get, j as unsubscribe_stores, k as escape_html } from './index-DwaY1cAm.js';
import './root-DDSnEAZv.js';
import './state.svelte-hBbXlUak.js';
import { p as page } from './stores-DHNzYNpX.js';
import './markdown-W_mTBct0.js';
import 'dompurify';
import 'marked';

function StatusBadge($$renderer, $$props) {
  const { status } = $$props;
  function getStatusLabel(s) {
    switch (s) {
      case "degraded":
        return "Degraded";
      case "error":
        return "Offline";
      case "healthy":
        return "Online";
      default:
        return "Checking";
    }
  }
  function getStatusClass(s) {
    switch (s) {
      case "degraded":
        return "degraded";
      case "error":
        return "offline";
      case "healthy":
        return "online";
      default:
        return "";
    }
  }
  $$renderer.push(`<div${attr_class(`status-badge ${stringify(getStatusClass(status))}`)}><span class="status-dot"></span> <span>${escape_html(getStatusLabel(status))}</span></div>`);
}
function _layout($$renderer, $$props) {
  $$renderer.component(($$renderer2) => {
    var $$store_subs;
    const { children } = $$props;
    let systemStatus = "unknown";
    $$renderer2.push(`<div class="app"><header class="header"><div class="header-content"><a href="/" class="logo"><img src="/app-icon.png" alt="Shooter" class="logo-icon" width="24" height="24"/> <span class="logo-text">Shooter</span></a> <div class="nav-right svelte-12qhfyh">`);
    StatusBadge($$renderer2, { status: systemStatus });
    $$renderer2.push(`<!----> <button${attr_class(`btn-gear ${stringify(store_get($$store_subs ??= {}, "$page", page).url.pathname === "/config" ? "btn-gear-active" : "")}`, "svelte-12qhfyh")} aria-label="Settings"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button></div></div></header> <div class="content-area svelte-12qhfyh">`);
    children($$renderer2);
    $$renderer2.push(`<!----></div> <nav class="bottom-tabs svelte-12qhfyh"><div class="bottom-tabs-inner svelte-12qhfyh"><a href="/"${attr_class("tab-item svelte-12qhfyh", void 0, {
      "active": store_get($$store_subs ??= {}, "$page", page).url.pathname === "/" || store_get($$store_subs ??= {}, "$page", page).url.pathname.startsWith("/project") || store_get($$store_subs ??= {}, "$page", page).url.pathname.startsWith("/session")
    })}><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg> <span>Projects</span></a> <a href="/terminals"${attr_class("tab-item svelte-12qhfyh", void 0, {
      "active": store_get($$store_subs ??= {}, "$page", page).url.pathname.startsWith("/terminals")
    })}><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg> <span>Terminals</span></a></div></nav></div>`);
    if ($$store_subs) unsubscribe_stores($$store_subs);
  });
}

export { _layout as default };
//# sourceMappingURL=_layout.svelte-CtWmEJwe.js.map
