import{d as b,ar as k,r as c,o as S,aM as o,aN as I,$ as e,c as g,g as V,f as r,w as s,X as f,t as d,u as p,e as N,j as T,i as _}from"./index-bf0eaf20.js";import{E as C}from"./EditConfig-6fbc7857.js";import{D as v}from"./DrawerNavigation.vue_vue_type_style_index_0_scoped_aaaae942_lang-1fc131e8.js";import{V as E}from"./VToolbar-219721ba.js";import{a as w}from"./VCard-97256dbd.js";import{V as x}from"./VList-21e2a257.js";import{a as q}from"./VCardText-8a9fa9c7.js";import{z as M}from"./VListItem-223b492d.js";import{c as R}from"./VMenu-71b97cab.js";import"./VExpansionPanels-9d44bf25.js";import"./VLabel-e07a3413.js";import"./VForm-a2651940.js";import"./VTextField-ad1ef579.js";import"./VVirtualScroll-837eb7b9.js";import"./VCheckboxBtn-f3296201.js";import"./VSpacer-36b6f8a9.js";/* empty css              */import"./VDialog-18e61467.js";import"./VAlert-e2b3a5a6.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Button-574f04d4.js";import"./layout-8db27034.js";const z=_("br",null,null,-1),B=_("br",null,null,-1),re=b({__name:"FrontendConfig",setup(G){const n=k(),i=c([]),u=c(!1);S(()=>{const a=localStorage.getItem("frontend.settings.menu_items"),t=a?a.split(","):v;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: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},{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}`,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)=>(g(),V("section",null,[r(E,{color:"transparent"},{title:s(()=>[f(d(p(e)("settings.frontend")),1)]),_:1}),r(q,{style:{"margin-left":"-5px","margin-right":"-5px"}},{default:s(()=>[r(w,null,{default:s(()=>[f(d(p(e)("settings.frontend_desc")),1)]),_:1}),z,B,r(x),i.value?(g(),N(C,{key:0,"config-entries":i.value,disabled:!1,onSubmit:y,onAction:h},null,8,["config-entries"])):T("",!0)]),_:1}),r(R,{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:s(()=>[r(M,{indeterminate:"",size:"64",color:"primary"})]),_:1},8,["modelValue"])]))}});export{re as default};
