import{C as T}from"./Container-BJVyLEng.js";import{a as p,i as G,_ as H}from"./index-STpfFCKU.js";import{L as M}from"./ListItem-DZcSd-zm.js";import{_ as I}from"./ProviderIcon.vue_vue_type_style_index_0_lang-KPoca4r5.js";import{_ as V}from"./Card.vue_vue_type_script_setup_true_lang-DL-AoWAy.js";import{_ as S,a as B}from"./CardTitle.vue_vue_type_script_setup_true_lang-CSC0q86g.js";import{_ as L}from"./CardHeader.vue_vue_type_script_setup_true_lang-B7D3vZSh.js";import{u as J}from"./vue-router-DHBbBOYe.js";import{d as l,b as K}from"./vuetify-Cc3ogKHH.js";import{d as O,o as R,r as q,G as a,H as t,c as g,g as N,F as v,O as k,u as i,J as o,e as r,n as h,K as D,a2 as d,a4 as m,_ as j,i as A,b as n}from"./lucide-OrjrigGq.js";import{u as P}from"./vue-i18n-B2QXlTQD.js";import"./index-kQIztB-E.js";import"./qrcode-BWzeHGfy.js";import"./marked-BPdRUrA1.js";import"./color-CqFg8eif.js";import"./vueuse-BZBkof_U.js";/* empty css            */import"./swiper-Bq331F5K.js";import"./Button-ymPHEC6K.js";const Q={key:0,class:"settings-grid"},U={class:"setting-header-top"},W={class:"provider-icon-white"},X={class:"setting-chevron"},Y={class:"setting-header-top"},Z={class:"setting-chevron"},ee={class:"provider-icon-white"},te=O({__name:"SystemConfig",setup(se){const C=J(),{t:u}=P(),E=A("systemViewMode"),F=N(()=>E?.viewMode.value??"list"),$=q([]),b=[{domain:"logging",name:"settings.system_logging",description:"settings.system_logging_description",icon:"mdi-text-box-search",route:"/settings/serverlogs"},{domain:"tasks",name:"background_tasks.title",description:"background_tasks.description",icon:"mdi-playlist-play",route:"/settings/tasks"},{domain:"genre_management",name:"settings.genre_management",description:"settings.genre_management_description",icon:G,route:"/settings/genremanagement"}],w=N(()=>[...$.value].sort((s,c)=>p.providerManifests[s.domain].name.localeCompare(p.providerManifests[c.domain].name))),z=s=>{const c=u(`settings.core_module.${s.domain}.name`);return c!==`settings.core_module.${s.domain}.name`?c:p.providerManifests[s.domain].name},x=s=>{const c=u(`settings.core_module.${s.domain}.description`);return c!==`settings.core_module.${s.domain}.description`?c:p.providerManifests[s.domain].description},_=s=>{"route"in s&&s.route?C.push(s.route):C.push(`/settings/editcore/${s.domain}`)},f=s=>({backgroundColor:{blue:"rgb(59, 130, 246)",purple:"rgb(168, 85, 247)"}[s]});return R(async()=>{$.value=await p.getCoreConfigs()}),(s,c)=>(n(),a(T,{variant:"comfortable",class:"settings-overview"},{default:t(()=>[F.value==="card"?(n(),g("div",Q,[(n(!0),g(v,null,k(w.value,e=>(n(),a(i(V),{key:e.domain,class:"setting-card",onClick:y=>_(e)},{default:t(()=>[o(i(L),null,{default:t(()=>[r("div",U,[r("div",{class:"setting-icon",style:h(f("blue"))},[r("div",W,[o(I,{domain:e.domain,size:20},null,8,["domain"])])],4),r("div",X,[e.last_error?(n(),a(l,{key:0,color:"red",icon:"mdi-alert-circle",title:e.last_error},null,8,["title"])):D("",!0),o(l,{icon:"mdi-chevron-right",size:"20"})])]),o(i(S),{class:"setting-title"},{default:t(()=>[d(m(z(e)),1)]),_:2},1024),o(i(B),{class:"setting-description"},{default:t(()=>[d(m(x(e)),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"]))),128)),(n(),g(v,null,k(b,e=>o(i(V),{key:e.domain,class:"setting-card",onClick:y=>_(e)},{default:t(()=>[o(i(L),null,{default:t(()=>[r("div",Y,[r("div",{class:"setting-icon",style:h(f("purple"))},[typeof e.icon!="string"?(n(),a(j(e.icon),{key:0,class:"size-5 text-white"})):(n(),a(l,{key:1,icon:e.icon,size:"20",color:"white"},null,8,["icon"]))],4),r("div",Z,[o(l,{icon:"mdi-chevron-right",size:"20"})])]),o(i(S),{class:"setting-title"},{default:t(()=>[d(m(i(u)(e.name)),1)]),_:2},1024),o(i(B),{class:"setting-description"},{default:t(()=>[d(m(i(u)(e.description)),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),64))])):(n(),a(K,{key:1,class:"settings-list"},{default:t(()=>[(n(!0),g(v,null,k(w.value,e=>(n(),a(M,{key:e.domain,link:"",class:"settings-list-item",onClick:y=>_(e)},{prepend:t(()=>[r("div",{class:"setting-list-icon",style:h(f("blue"))},[r("div",ee,[o(I,{domain:e.domain,size:20},null,8,["domain"])])],4)]),title:t(()=>[d(m(z(e)),1)]),subtitle:t(()=>[d(m(x(e)),1)]),append:t(()=>[e.last_error?(n(),a(l,{key:0,color:"red",icon:"mdi-alert-circle",class:"mr-2",title:e.last_error},null,8,["title"])):D("",!0),o(l,{icon:"mdi-chevron-right",size:"20"})]),_:2},1032,["onClick"]))),128)),(n(),g(v,null,k(b,e=>o(M,{key:e.domain,link:"",class:"settings-list-item",onClick:y=>_(e)},{prepend:t(()=>[r("div",{class:"setting-list-icon",style:h(f("purple"))},[typeof e.icon!="string"?(n(),a(j(e.icon),{key:0,class:"size-5 text-white"})):(n(),a(l,{key:1,icon:e.icon,size:"20",color:"white"},null,8,["icon"]))],4)]),title:t(()=>[d(m(i(u)(e.name)),1)]),subtitle:t(()=>[d(m(i(u)(e.description)),1)]),append:t(()=>[o(l,{icon:"mdi-chevron-right",size:"20"})]),_:2},1032,["onClick"])),64))]),_:1}))]),_:1}))}}),$e=H(te,[["__scopeId","data-v-96adf6a8"]]);export{$e as default};
