import{d as V,a1 as b,r as c,o as S,aL as i,$ as e,c as f,h as k,f as o,w as r,m as p,t as d,u as g,e as I,j as C,g as _}from"./index-0ae84607.js";import{_ as T}from"./EditConfig.vue_vue_type_style_index_0_lang-991e1055.js";import{D as v}from"./DrawerNavigation.vue_vue_type_style_index_0_scoped_dcfca61c_lang-1291dfb0.js";import{V as x}from"./VToolbar-b7dd8339.js";import{a as N}from"./VCard-e96ab32b.js";import{a as E,t as M}from"./forwardRefs-d0d7c5bd.js";import{V as w}from"./VCardText-b1a0de89.js";import{e as z}from"./VMenu-f26d3a19.js";import"./VExpansionPanel-4cf67b18.js";import"./VInput-00e20677.js";import"./VSlideGroup-18f8a11f.js";import"./VForm-272c3dd0.js";/* empty css              */import"./VDialog-2b5eada8.js";import"./VAlert-212471f5.js";import"./VTextField-4bf39c0d.js";import"./VSelect-2b6c5c22.js";import"./VVirtualScroll-06bbaaf5.js";import"./logo-61d7c0d2.js";import"./Button-a1dfd3f5.js";import"./layout-f3684635.js";const B=_("br",null,null,-1),D=_("br",null,null,-1),oe=V({__name:"FrontendConfig",setup(R){const n=b(),s=c([]),u=c(!1);S(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),t=a?a.split(","):v;s.value=[{key:"theme",type:i.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:"menu_style",type:i.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:i.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("radios"),value:"radios"},{title:e("browse"),value:"browse"},{title:e("settings.settings"),value:"settings"}],multi_value:!0,category:"generic",value:t}]});const y=async function(a){for(const t in a){const l=`frontend.settings.${t}`,m=a[t];m?localStorage.setItem(l,m.toString()):localStorage.removeItem(l)}n.push({name:"home"}).then(()=>{n.go(0)})},h=async function(a,t){};return(a,t)=>(f(),k("section",null,[o(x,{color:"transparent"},{title:r(()=>[p(d(g(e)("settings.frontend")),1)]),_:1}),o(w,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:r(()=>[o(N,null,{default:r(()=>[p(d(g(e)("settings.frontend_desc")),1)]),_:1}),B,D,o(E),s.value?(f(),I(T,{key:0,"config-entries":s.value,disabled:!1,onSubmit:y,onAction:h},null,8,["config-entries"])):C("",!0)]),_:1}),o(z,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=l=>u.value=l),scrim:"true",persistent:"",style:{display:"flex","align-items":"center","justify-content":"center"}},{default:r(()=>[o(M,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{oe as default};
