import { a as ensure_array_like, b as attr, c as attr_class, s as stringify, e as escape_html, d as derived } from "../../../chunks/index3.js";
import { p as page } from "../../../chunks/index4.js";
import "@sveltejs/kit/internal";
import "../../../chunks/url.js";
import "../../../chunks/utils.js";
import "@sveltejs/kit/internal/server";
import "../../../chunks/root.js";
import "../../../chunks/exports.js";
import "../../../chunks/state.svelte.js";
function Sidebar($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const user = derived(() => page.data?.user);
const nav = [
{ href: "/", label: "Dashboard", icon: "⌂" },
{ href: "/matches", label: "Matches", icon: "⚔" },
{ href: "/mappools", label: "Mappools", icon: "♫" },
{ href: "/teams", label: "Teams", icon: "⚑" }
];
function isActive(href) {
if (href === "/") return page.url.pathname === "/";
return page.url.pathname.startsWith(href);
}
const isAdmin = derived(() => user()?.role === "admin");
$$renderer2.push(``);
});
}
function Header($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const user = derived(() => page.data?.user);
const roleBadge = {
referee: { label: "REF", color: "bg-yellow-500/20 text-yellow-400" },
admin: { label: "ADMIN", color: "bg-red-500/20 text-red-400" }
};
const badge = derived(() => user()?.role ? roleBadge[user().role] : null);
$$renderer2.push(``);
} else {
$$renderer2.push("");
}
$$renderer2.push(` ${escape_html(user().name)}