import{d as b,aj as k,r as m,o as S,aC as o,aD as I,$ as e,c,g as V,f as r,w as s,Y as d,t as f,u as g,e as C,j as N,i as v}from"./index-103db515.js";import{E as T}from"./EditConfig-f05929af.js";import{D as p}from"./DrawerNavigation.vue_vue_type_style_index_0_scoped_2862bff2_lang-9811294a.js";import{V as w}from"./VToolbar-dcf67568.js";import{a as E}from"./VCard-d4f085fd.js";import{V as x}from"./VList-cac73f62.js";import{a as q}from"./VCardText-1a59cac1.js";import{y as R}from"./VListItem-ab7a82e2.js";import{c as B}from"./VMenu-482e7fbc.js";import"./VExpansionPanels-dacf6c3c.js";import"./VCheckboxBtn-19bafbc9.js";import"./VForm-f2e1d3c9.js";import"./VTextField-73438668.js";import"./VVirtualScroll-b23fb9a8.js";import"./VSpacer-adcb10ea.js";/* empty css              */import"./VDialog-08f8879f.js";import"./VAlert-4165d2e6.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Button-412f73ce.js";import"./layout-e7ad5131.js";const D=v("br",null,null,-1),G=v("br",null,null,-1),oe=b({__name:"FrontendConfig",setup(M){const _=k(),i=m([]),n=m(!1);S(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),t=a?a.split(","):p;i.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:s(()=>[d(f(g(e)("settings.frontend")),1)]),_:1}),r(q,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:s(()=>[r(E,null,{default:s(()=>[d(f(g(e)("settings.frontend_desc")),1)]),_:1}),D,G,r(x),i.value?(c(),C(T,{key:0,"config-entries":i.value,disabled:!1,onSubmit:y,onAction:h},null,8,["config-entries"])):N("",!0)]),_:1}),r(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:s(()=>[r(R,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{oe as default};
