import{x as S,az as k,r as m,o as h,aQ as s,aR as V,$ as e,y as d,D as I,n as o,A as i,S as g,J as c,G as f,B as p,z as C,K as N}from"./index-CFvoaD7J.js";import{E as T}from"./EditConfig-Ct-cJfRC.js";import{D as v}from"./constants-BXWEQHoz.js";import{V as x}from"./VToolbar-Da4d1W_R.js";import{b as E,a as z}from"./VCardText-CpOuj25H.js";import{e as B}from"./VMenu-9pSrU4Fo.js";import{V as R}from"./VList-fGk9SRdf.js";import{C as q}from"./VListItem-CSPID7yq.js";import"./VExpansionPanels-BsT7TGi_.js";import"./VCheckboxBtn-CRgZyCzV.js";import"./VAlert-CIiIOQza.js";import"./VSwitch-Cbz5zuOr.js";import"./VTextField-DF4u_eMy.js";import"./VVirtualScroll-BDBVEoUv.js";import"./VChip-Ccz1-bmn.js";import"./VSlider-ka6goZbo.js";import"./VForm-B86dz_JX.js";import"./VCard-DxLPF-Ra.js";import"./VSpacer-UYEiyhN7.js";/* empty css              */import"./VDialog-CdvGeqlS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const le=S({__name:"FrontendConfig",setup(w){const y=k(),r=m([]),n=m(!1);h(()=>{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(),I("section",null,[o(x,{color:"transparent"},{title:i(()=>[g(c(f(e)("settings.frontend")),1)]),_:1}),o(E,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:i(()=>[o(z,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(R),r.value?(d(),C(T,{key:0,"config-entries":r.value,disabled:!1,onSubmit:_,onAction:b},null,8,["config-entries"])):N("",!0)]),_:1}),o(B,{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(q,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{le as default};
