import{d as b,an as S,r as m,o as V,aE as s,aF as k,$ as e,c,g as I,f as o,w as r,Y as g,t as d,u as f,e as C,j as N,i as v}from"./index-e34071c2.js";import{E as T}from"./EditConfig-5e7973cb.js";import{D as p}from"./DrawerNavigation.vue_vue_type_style_index_0_scoped_7bacef92_lang-c87d6587.js";import{V as E}from"./VToolbar-790d92bd.js";import{a as x}from"./VCard-0f63f60c.js";import{V as w}from"./VList-5a526902.js";import{a as q}from"./VCardText-2a290ffe.js";import{y as B}from"./VListItem-6fb16d04.js";import{c as M}from"./VMenu-8ea0aa0a.js";import"./VExpansionPanels-a37be689.js";import"./VCheckboxBtn-43c6a5b9.js";import"./VForm-9598bded.js";import"./VTextField-df721147.js";import"./VVirtualScroll-8b839030.js";import"./VSpacer-b7ae4876.js";/* empty css              */import"./VDialog-57dacf99.js";import"./VAlert-cd8a958f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Button-d52131a6.js";import"./layout-4fa46c33.js";const R=v("br",null,null,-1),z=v("br",null,null,-1),oe=b({__name:"FrontendConfig",setup(D){const _=S(),i=m([]),n=m(!1);V(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),t=a?a.split(","):p;i.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"},...k.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: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:"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 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(),I("section",null,[o(E,{color:"transparent"},{title:r(()=>[g(d(f(e)("settings.frontend")),1)]),_:1}),o(q,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:r(()=>[o(x,null,{default:r(()=>[g(d(f(e)("settings.frontend_desc")),1)]),_:1}),R,z,o(w),i.value?(c(),C(T,{key:0,"config-entries":i.value,disabled:!1,onSubmit:y,onAction:h},null,8,["config-entries"])):N("",!0)]),_:1}),o(M,{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:r(()=>[o(B,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{oe as default};
