import { an as stringify, ao as store_get, ap as attr_class, aq as unsubscribe_stores } from './index-CoYB03g7.js';
import { g as goto } from './client-Ds1brw-8.js';
import { p as page } from './stores-CRYxfF0o.js';
import { S as SettingsSvg } from './settings-Dv3Esboo.js';
import { B as Button } from './Button-D0hZ7JYt.js';
import { I as Icon } from './Icon-D0GBnDcs.js';
import { P as Pill } from './Pill-4xJ-VhAA.js';
import './root-D4IoFC8F.js';
import './index2-dSGQ9Eaa.js';
import './state.svelte-CmHqngc_.js';
import './close-DR469d4F.js';

const BellSvg = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n  <path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/>\n  <path d="M13.73 21a2 2 0 0 1-3.46 0"/>\n</svg>\n';
const DashboardSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">\n  <rect x="3" y="3" width="7" height="7"/>\n  <rect x="14" y="3" width="7" height="7"/>\n  <rect x="3" y="14" width="7" height="7"/>\n  <rect x="14" y="14" width="7" height="7"/>\n</svg>\n';
const TerminalSvg = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" 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>\n';
const ToolSvg = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n  <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>\n</svg>\n';
function _layout($$renderer, $$props) {
  $$renderer.component(($$renderer2) => {
    var $$store_subs;
    const { children, data } = $$props;
    let systemStatus = "unknown";
    const statusLabels = {
      degraded: "Degraded",
      error: "Offline",
      healthy: "Online",
      unknown: "Checking"
    };
    const statusClasses = {
      degraded: "pill-status-degraded",
      error: "pill-status-offline",
      healthy: "pill-status-online",
      unknown: "pill-status-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">`);
    Pill($$renderer2, {
      text: statusLabels[systemStatus],
      classes: statusClasses[systemStatus]
    });
    $$renderer2.push(`<!----> `);
    {
      let icon = function($$renderer3) {
        Icon($$renderer3, { svg: SettingsSvg, classes: "icon-18" });
      };
      Button($$renderer2, {
        classes: `btn-gear ${stringify(store_get($$store_subs ??= {}, "$page", page).url.pathname === "/config" ? "btn-gear-active" : "")}`,
        onclick: () => {
          void goto();
        },
        ariaLabel: "Settings",
        icon,
        $$slots: { icon: true }
      });
    }
    $$renderer2.push(`<!----></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")
    })}>`);
    Icon($$renderer2, { svg: DashboardSvg, classes: "icon-26" });
    $$renderer2.push(`<!----> <span>Dashboard</span></a> <a href="/activity"${attr_class("tab-item svelte-12qhfyh", void 0, {
      "active": store_get($$store_subs ??= {}, "$page", page).url.pathname.startsWith("/activity")
    })}>`);
    Icon($$renderer2, { svg: BellSvg, classes: "icon-26" });
    $$renderer2.push(`<!----> <span>Activity</span></a> <a href="/terminals"${attr_class("tab-item svelte-12qhfyh", void 0, {
      "active": store_get($$store_subs ??= {}, "$page", page).url.pathname.startsWith("/terminals")
    })}>`);
    Icon($$renderer2, { svg: TerminalSvg, classes: "icon-26" });
    $$renderer2.push(`<!----> <span>Terminals</span></a> <a href="/sos"${attr_class("tab-item svelte-12qhfyh", void 0, {
      "active": store_get($$store_subs ??= {}, "$page", page).url.pathname.startsWith("/sos")
    })}>`);
    Icon($$renderer2, { svg: ToolSvg, classes: "icon-26" });
    $$renderer2.push(`<!----> <span>SoS</span></a></div></nav></div>`);
    if ($$store_subs) unsubscribe_stores($$store_subs);
  });
}

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