import{B as y,a as _,d as e,t as r,j as l,o as $,_ as k,e as q,C as L}from"./_plugin-vue_export-helper-fP7Bc2kv.js";const S=()=>localStorage.getItem("theme"),C=t=>localStorage.setItem("theme",t),c=()=>{const t=S();return t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")},h=t=>{t==="auto"?document.documentElement.setAttribute("data-bs-theme",window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):document.documentElement.setAttribute("data-bs-theme",t)},p=(t,a=!1)=>{const s=document.querySelector("#bd-theme");if(!s)return;const o=document.querySelector("#bd-theme-text"),n=document.querySelector(".theme-icon-active i"),i=document.querySelector(`[data-bs-theme-value="${t}"]`),d=i.querySelector("i").classList;document.querySelectorAll("[data-bs-theme-value]").forEach(v=>{v.classList.remove("active"),v.setAttribute("aria-pressed","false")}),i.classList.add("active"),i.setAttribute("aria-pressed","true"),n.classList.remove(...n.classList.values()),n.classList.add(...d);const T=`${o.textContent} (${i.textContent.trim()})`;s.setAttribute("aria-label",T),a&&s.focus()};function A(){document.querySelectorAll("[data-bs-theme-value]").forEach(t=>{t.addEventListener("click",()=>{const a=t.getAttribute("data-bs-theme-value");C(a),h(a),p(a,!0)})}),p(c(),!1)}function E(){h(c()),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{const t=S();t!=="light"&&t!=="dark"&&h(c())}),window.addEventListener("DOMContentLoaded",()=>{p(c())})}const x={class:"dropdown bd-mode-toggle"},M={class:"nav-link dropdown-toggle align-items-center",id:"bd-theme",type:"button","aria-expanded":"false","data-bs-toggle":"dropdown","aria-label":"{{ $t('navbar.toggle_theme') }} ({{ $t('navbar.theme_auto') }})"},R={id:"bd-theme-text"},D={class:"dropdown-menu dropdown-menu-end","aria-labelledby":"bd-theme-text"},Q={type:"button",class:"dropdown-item d-flex align-items-center","data-bs-theme-value":"light","aria-pressed":"false"},B={type:"button",class:"dropdown-item d-flex align-items-center","data-bs-theme-value":"dark","aria-pressed":"false"},N={type:"button",class:"dropdown-item d-flex align-items-center active","data-bs-theme-value":"auto","aria-pressed":"true"},j={__name:"ThemeToggle",setup(t){return y(()=>{E(),A()}),(a,s)=>($(),_("div",x,[e("a",M,[s[0]||(s[0]=e("span",{class:"bi my-1 theme-icon-active"},[e("i",{class:"fa-solid fa-circle-half-stroke"})],-1)),e("span",R,r(a.$t("navbar.toggle_theme")),1)]),e("ul",D,[e("li",null,[e("button",Q,[s[1]||(s[1]=e("i",{class:"bi me-2 theme-icon fas fa-fw fa-solid fa-sun"},null,-1)),l(" "+r(a.$t("navbar.theme_light")),1)])]),e("li",null,[e("button",B,[s[2]||(s[2]=e("i",{class:"bi me-2 theme-icon fas fa-fw fa-solid fa-moon"},null,-1)),l(" "+r(a.$t("navbar.theme_dark")),1)])]),e("li",null,[e("button",N,[s[3]||(s[3]=e("i",{class:"bi me-2 theme-icon fas fa-fw fa-solid fa-circle-half-stroke"},null,-1)),l(" "+r(a.$t("navbar.theme_auto")),1)])])])]))}};var u,b;function I(){if(b)return u;b=1;function t(a,s){const o=document.createElement("script");o.src=a,o.async=!0,o.onload=()=>{s&&s(null,o)},o.onerror=()=>{s&&s(new Error(`Failed to load script: ${a}`))},document.head.appendChild(o)}return typeof window<"u"&&(window.loadScript=t),u=t,u}var m,g;function V(){if(g)return m;g=1;let t=null;async function a(){return t||(t=await(await fetch("https://app.lizardbyte.dev/uno/random-quotes/games.json")).json()),t[Math.floor(Math.random()*t.length)]}function s(){t=null}return m={fetchRandomQuote:a,resetQuoteCache:s},m}var f,w;function H(){if(w)return f;w=1;const t=I(),{fetchRandomQuote:a}=V();function s(n,i){let d=n.quote_safe||n.quote;i.notify(d)}function o(){t("https://cdn.jsdelivr.net/npm/@widgetbot/crate@3",function(){let n=new Crate({server:"804382334370578482",channel:"804383092822900797",defer:!1});const i=document.createElement("style");i.innerHTML=`
            widgetbot-crate {
                position: fixed !important;
            }
        `,document.head.appendChild(i),a().then(d=>{setTimeout(()=>{n&&s(d,n)},420*1e3)})})}return typeof window<"u"&&(window.initDiscord=o),f={initDiscord:o,randomQuote:s},f}var O=H();const z=""+new URL("../images/logo-sunshine-45.png",import.meta.url).href,F={components:{ThemeToggle:j},created(){console.log("Header mounted!")},mounted(){let t=document.querySelector("a[href='"+document.location.pathname+"']");t&&t.classList.add("active"),O.initDiscord()}},P={class:"navbar navbar-light navbar-expand-lg navbar-background header"},U={class:"container-fluid"},G={class:"collapse navbar-collapse",id:"navbarSupportedContent"},J={class:"navbar-nav me-auto mb-2 mb-lg-0"},K={class:"nav-item"},W={class:"nav-link",href:"./"},X={class:"nav-item"},Y={class:"nav-link",href:"./pin"},Z={class:"nav-item"},ee={class:"nav-link",href:"./apps"},te={class:"nav-item"},ae={class:"nav-link",href:"./config"},se={class:"nav-item"},oe={class:"nav-link",href:"./password"},ne={class:"nav-item"},ie={class:"nav-link",href:"./troubleshooting"},re={class:"nav-item"};function le(t,a,s,o,n,i){const d=L("ThemeToggle");return $(),_("nav",P,[e("div",U,[a[6]||(a[6]=e("a",{class:"navbar-brand",href:"./",title:"Sunshine"},[e("img",{src:z,height:"45",alt:"Sunshine"})],-1)),a[7]||(a[7]=e("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarSupportedContent","aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation"},[e("span",{class:"navbar-toggler-icon"})],-1)),e("div",G,[e("ul",J,[e("li",K,[e("a",W,[a[0]||(a[0]=e("i",{class:"fas fa-fw fa-home"},null,-1)),l(" "+r(t.$t("navbar.home")),1)])]),e("li",X,[e("a",Y,[a[1]||(a[1]=e("i",{class:"fas fa-fw fa-unlock"},null,-1)),l(" "+r(t.$t("navbar.pin")),1)])]),e("li",Z,[e("a",ee,[a[2]||(a[2]=e("i",{class:"fas fa-fw fa-stream"},null,-1)),l(" "+r(t.$t("navbar.applications")),1)])]),e("li",te,[e("a",ae,[a[3]||(a[3]=e("i",{class:"fas fa-fw fa-cog"},null,-1)),l(" "+r(t.$t("navbar.configuration")),1)])]),e("li",se,[e("a",oe,[a[4]||(a[4]=e("i",{class:"fas fa-fw fa-user-shield"},null,-1)),l(" "+r(t.$t("navbar.password")),1)])]),e("li",ne,[e("a",ie,[a[5]||(a[5]=e("i",{class:"fas fa-fw fa-info"},null,-1)),l(" "+r(t.$t("navbar.troubleshoot")),1)])]),e("li",re,[q(d)])])])])])}const ce=k(F,[["render",le]]);export{ce as N};
