import{d as b,ai as k,r as m,o as S,aB as o,aC as I,$ as e,c,g as V,f as r,w as i,X as d,t as f,u as g,e as C,j as N,i as v}from"./index-2cc203e3.js";import{E as T}from"./EditConfig-47bfd3ff.js";import{D as p}from"./DrawerNavigation.vue_vue_type_style_index_0_scoped_2862bff2_lang-4d2d15cb.js";import{V as w}from"./VToolbar-c4261af7.js";import{a as E}from"./VCard-b60fc702.js";import{V as x}from"./VList-443b6a64.js";import{a as q}from"./VCardText-73ade3a6.js";import{y as B}from"./VListItem-0e8aff4c.js";import{c as R}from"./VMenu-d17aeffc.js";import"./VExpansionPanels-cd619ed8.js";import"./VCheckboxBtn-682ecc08.js";import"./VForm-e751af88.js";import"./VTextField-bd94c9e9.js";import"./VVirtualScroll-c8cd8ef4.js";import"./VSpacer-1e3f95a3.js";/* empty css              */import"./VDialog-d54fbebe.js";import"./VAlert-01d85de0.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Button-7ab51f27.js";import"./layout-3cf9335a.js";const G=v("br",null,null,-1),M=v("br",null,null,-1),oe=b({__name:"FrontendConfig",setup(z){const _=k(),s=m([]),n=m(!1);S(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),t=a?a.split(","):p;s.value=[{key:"theme",type:o.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:o.STRING,label:"language",default_value:"auto",required:!1,options:[{title:"auto",value:"auto"},...I.global.availableLocales.map(l=>({title:l,value:l}))],multi_value:!1,category:"generic",value:localStorage.getItem("frontend.settings.language")},{key:"menu_style",type:o.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:o.STRING,label:"menu_items",default_value:p,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("radios"),value:"radios"},{title:e("browse"),value:"browse"},{title:e("settings.settings"),value:"settings"}],multi_value:!0,category:"generic",value:t},{key:"artwork_pref",type:o.STRING,label:"artwork_pref",default_value:"online",required:!1,options:[{title:"online",value:"online"},{title:"server_only",value:"server_only"}],multi_value:!1,category:"advanced",value:localStorage.getItem("frontend.settings.artwork_pref")},{key:"hide_settings",type:o.BOOLEAN,label:"hide_settings",default_value:!1,required:!1,multi_value:!1,category:"advanced",value:localStorage.getItem("frontend.settings.hide_settings")=="true"}]});const y=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)}_.push({name:"home"}).then(()=>{window.location.reload()})},h=async function(a,t){};return(a,t)=>(c(),V("section",null,[r(w,{color:"transparent"},{title:i(()=>[d(f(g(e)("settings.frontend")),1)]),_:1}),r(q,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:i(()=>[r(E,null,{default:i(()=>[d(f(g(e)("settings.frontend_desc")),1)]),_:1}),G,M,r(x),s.value?(c(),C(T,{key:0,"config-entries":s.value,disabled:!1,onSubmit:y,onAction:h},null,8,["config-entries"])):N("",!0)]),_:1}),r(R,{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(()=>[r(B,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{oe as default};
