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(`
`); if (user()) { $$renderer2.push(""); $$renderer2.push(`
`); if (badge()) { $$renderer2.push(""); $$renderer2.push(`${escape_html(badge().label)}`); } else { $$renderer2.push(""); } $$renderer2.push(` `); if (user().image) { $$renderer2.push(""); $$renderer2.push(``); } else { $$renderer2.push(""); } $$renderer2.push(` ${escape_html(user().name)}
`); } else { $$renderer2.push(""); $$renderer2.push(`Sign in with osu!`); } $$renderer2.push(`
`); }); } function _layout($$renderer, $$props) { $$renderer.component(($$renderer2) => { let { children } = $$props; const user = derived(() => page.data?.user); if (user()) { $$renderer2.push(""); $$renderer2.push(`
`); Sidebar($$renderer2); $$renderer2.push(`
`); Header($$renderer2); $$renderer2.push(`
`); children($$renderer2); $$renderer2.push(`
`); } else { $$renderer2.push(""); $$renderer2.push(`
V
Vash Esports
Sign in with osu!
`); children($$renderer2); $$renderer2.push(`
`); } $$renderer2.push(``); }); } export { _layout as default };