import{Q as S,x as m,o as k,bU as s,bV as V,a8 as e,Z as h,B as o,U as i,bm as I,b3 as C,S as d,al as g,aa as c,a0 as f,W as p,R as N,a9 as T,aV as x,Y as E,bn as B}from"./index-orrnp8a1.js";import{E as R}from"./EditConfig-B4rbu_aP.js";import{D as v}from"./constants-BXWEQHoz.js";import{V as q}from"./VToolbar-BlKUHnwt.js";import{f as w}from"./VBtn-BJolvyKt.js";import"./VForm-BDfEPrwE.js";import"./VCheckboxBtn-CICj8ZxL.js";import"./VExpansionPanels-CT7PNnnx.js";import"./VAlert-BhQ3L7Kc.js";import"./VSwitch-Cg3DDPQB.js";import"./VTextField-DaF8PfrV.js";import"./VVirtualScroll-Q9Rc10mA.js";import"./VChip-DzIcRFdM.js";import"./VSlider-G4xlE4rG.js";import"./VDialog-oxeMlk6d.js";import"./VSpacer-FMK5QbR9.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";const X=S({__name:"FrontendConfig",setup(M){const y=B(),r=m([]),n=m(!1);k(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),t=a?a.split(","):v;r.value=[{key:"theme",type:s.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:s.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:s.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:s.STRING,label:"menu_items",default_value:v,required:!1,options:[{title:e("home"),value:"home"},{title:e("search"),value:"search"},{title:e("artists"),value:"artists"},{title:e("albums"),value:"albums"},{title:e("tracks"),value:"tracks"},{title:e("playlists"),value:"playlists"},{title:e("audiobooks"),value:"audiobooks"},{title:e("podcasts"),value:"podcasts"},{title:e("radios"),value:"radios"},{title:e("browse"),value:"browse"},{title:e("settings.settings"),value:"settings"}],multi_value:!0,category:"generic",value:t},{key:"hide_settings",type:s.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 t in a){const l=`frontend.settings.${t}`,u=a[t];u?localStorage.setItem(l,u.toString()):localStorage.removeItem(l)}y.push({name:"home"}).then(()=>{window.location.reload()})},b=async function(a,t){};return(a,t)=>(d(),h("section",null,[o(q,{color:"transparent"},{title:i(()=>[g(c(f(e)("settings.frontend")),1)]),_:1}),o(I,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:i(()=>[o(x,null,{default:i(()=>[g(c(f(e)("settings.frontend_desc")),1)]),_:1}),t[1]||(t[1]=p("br",null,null,-1)),t[2]||(t[2]=p("br",null,null,-1)),o(E),r.value?(d(),N(R,{key:0,"config-entries":r.value,disabled:!1,onSubmit:_,onAction:b},null,8,["config-entries"])):T("",!0)]),_:1}),o(C,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=l=>n.value=l),scrim:"true",persistent:"",style:{display:"flex","align-items":"center","justify-content":"center"}},{default:i(()=>[o(w,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{X as default};
