import{d as h,ak as S,r as m,o as k,aB as r,aC as V,$ as t,c as g,h as I,f as o,w as s,W as c,t as d,u as f,g as p,e as C,j as N}from"./index-CLKg64ON.js";import{E as T}from"./EditConfig-CkB1xNeb.js";import{D as v}from"./DrawerNavigation.vue_vue_type_style_index_0_scoped_42f910eb_lang-DiAXO-Lw.js";import{V as E}from"./VToolbar-DSn0RyUD.js";import{b as x,a as w}from"./VCardText-BAUfdzDA.js";import{c as B}from"./VMenu-CLSWQG_U.js";import{V as q}from"./VList-BvG6-yh2.js";import{z}from"./VListItem-B_TSjQ1y.js";import"./VExpansionPanels-BBVj4yuE.js";import"./VCheckboxBtn-DXJHHMHd.js";import"./VAlert-CCGDAWu2.js";import"./VTextField-C1QkMZRy.js";import"./VForm-Cft_KNdc.js";import"./VVirtualScroll-DKBgr9yN.js";import"./VCard-BaRPabiE.js";import"./VSpacer-CqqJVVs3.js";/* empty css              */import"./VDialog-BpGrcp5y.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Button-F8l3l_P8.js";import"./layout-CYdR31l5.js";const ae=h({__name:"FrontendConfig",setup(M){const y=S(),i=m([]),n=m(!1);k(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),e=a?a.split(","):v;i.value=[{key:"theme",type:r.STRING,label:"theme",default_value:"auto",required:!1,options:[{title:"auto",value:"auto"},{title:"dark",value:"dark"},{title:"light",value:"light"}],multi_value:!1,category:"generic",value:localStorage.getItem("frontend.settings.theme")},{key:"language",type:r.STRING,label:"language",default_value:"auto",required:!1,options:[{title:"auto",value:"auto"},...V.global.availableLocales.map(l=>({title:l,value:l}))],multi_value:!1,category:"generic",value:localStorage.getItem("frontend.settings.language")},{key:"menu_style",type:r.STRING,label:"menu_style",default_value:"horizontal",required:!1,options:[{title:"horizontal",value:"horizontal"},{title:"vertical",value:"vertical"}],multi_value:!1,category:"generic",value:localStorage.getItem("frontend.settings.menu_style")},{key:"menu_items",type:r.STRING,label:"menu_items",default_value:v,required:!1,options:[{title:t("home"),value:"home"},{title:t("search"),value:"search"},{title:t("artists"),value:"artists"},{title:t("albums"),value:"albums"},{title:t("tracks"),value:"tracks"},{title:t("playlists"),value:"playlists"},{title:t("radios"),value:"radios"},{title:t("browse"),value:"browse"},{title:t("settings.settings"),value:"settings"}],multi_value:!0,category:"generic",value:e},{key:"hide_settings",type:r.BOOLEAN,label:"hide_settings",default_value:!1,required:!1,multi_value:!1,category:"advanced",value:localStorage.getItem("frontend.settings.hide_settings")=="true"}]});const _=async function(a){for(const e in a){const l=`frontend.settings.${e}`,u=a[e];u?localStorage.setItem(l,u.toString()):localStorage.removeItem(l)}y.push({name:"home"}).then(()=>{window.location.reload()})},b=async function(a,e){};return(a,e)=>(g(),I("section",null,[o(E,{color:"transparent"},{title:s(()=>[c(d(f(t)("settings.frontend")),1)]),_:1}),o(x,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:s(()=>[o(w,null,{default:s(()=>[c(d(f(t)("settings.frontend_desc")),1)]),_:1}),e[1]||(e[1]=p("br",null,null,-1)),e[2]||(e[2]=p("br",null,null,-1)),o(q),i.value?(g(),C(T,{key:0,"config-entries":i.value,disabled:!1,onSubmit:_,onAction:b},null,8,["config-entries"])):N("",!0)]),_:1}),o(B,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=l=>n.value=l),scrim:"true",persistent:"",style:{display:"flex","align-items":"center","justify-content":"center"}},{default:s(()=>[o(z,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{ae as default};
