import{p as F,m as R,g as x,d as H,j as l,a as j,l as S,a6 as U,r as u,o as q,H as s,Q as z,af as E,v as b,A as y,I as e,y as r,N as k,J as t,F as L,B as J,q as d,D as T,R as Q,x as V}from"./index-dcf0de03.js";import{L as G,_ as K}from"./ListItem-6dad7331.js";import{C as B}from"./Container-d623752d.js";import{V as I}from"./VToolbar-dfba6de4.js";import{b as A}from"./VMenu-3bdd1b96.js";import{a as O,n as W,d as X,p as Y,i as Z,j as D}from"./VBtn-a0da5efe.js";import"./VListItem-943ee224.js";/* empty css              */import"./index-0afee102.js";const ee=F({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...O(),...W(),...X(),...R()},"VTable"),te=x()({name:"VTable",props:ee(),setup(i,p){let{slots:n}=p;const{themeClasses:f}=H(i),{densityClasses:_}=Y(i);return Z(()=>l(i.tag,{class:["v-table",{"v-table--fixed-height":!!i.height,"v-table--fixed-header":i.fixedHeader,"v-table--fixed-footer":i.fixedFooter,"v-table--has-top":!!n.top,"v-table--has-bottom":!!n.bottom,"v-table--hover":i.hover},f.value,_.value,i.class],style:i.style},{default:()=>{var m,v,c;return[(m=n.top)==null?void 0:m.call(n),n.default?l("div",{class:"v-table__wrapper",style:{height:j(i.height)}},[l("table",null,[n.default()])]):(v=n.wrapper)==null?void 0:v.call(n),(c=n.bottom)==null?void 0:c.call(n)]}})),{}}}),ae={style:{"margin-bottom":"10px"}},se={class:"line-clamp-1"},ne={class:"line-clamp-1"},oe={style:{"margin-bottom":"10px"}},le={key:0},ie={href:"${api.baseUrl}/log",target:"_blank"},pe=S({__name:"CoreConfigs",setup(i){const p=U(),n=u([]),f=u(0),_=u(0),m=u(0),v=u(0),c=u(0),h=function(a){p.push(`/settings/editcore/${a}`)},M=function(a){window.open(a,"_blank")};return q(async()=>{n.value=await s.getCoreConfigs(),f.value=(await s.getLibraryArtists(void 0,void 0,1)).total||0,_.value=(await s.getLibraryAlbums(void 0,void 0,1)).total||0,m.value=(await s.getLibraryTracks(void 0,void 0,1)).total||0,v.value=(await s.getLibraryPlaylists(void 0,void 0,1)).total||0,c.value=(await s.getLibraryRadios(void 0,void 0,1)).total||0}),(a,re)=>{const N=z("Button"),P=E("hold");return b(),y(L,null,[e("div",ae,[l(I,{color:"transparent",style:{height:"55px"}},{title:r(()=>[k(t(a.$t("settings.settings"))+" | "+t(a.$t("settings.core_modules")),1)]),_:1}),l(A),l(B,null,{default:r(()=>[(b(!0),y(L,null,J(n.value.sort((o,g)=>d(s).providerManifests[o.domain].name.localeCompare(d(s).providerManifests[g.domain].name)),o=>Q((b(),V(G,{key:o.domain,class:"list-item-main",link:"","context-menu-items":[{label:"settings.configure",labelArgs:[],action:()=>{h(o.domain)},icon:"mdi-cog"},{label:"settings.documentation",labelArgs:[],action:()=>{M(d(s).providerManifests[o.domain].documentation)},icon:"mdi-bookshelf",disabled:!d(s).providerManifests[o.domain].documentation}],onClick:g=>h(o.domain)},{prepend:r(()=>[l(K,{domain:o.domain,size:40,class:"listitem-media-thumb",style:{"margin-left":"10px"}},null,8,["domain"])]),title:r(()=>[e("div",se,t(d(s).providerManifests[o.domain].name),1)]),subtitle:r(()=>[e("div",ne,t(d(s).providerManifests[o.domain].description),1)]),append:r(()=>[o.last_error?(b(),V(N,{key:0,icon:"",title:o.last_error},{default:r(()=>[l(D,{color:"red"},{default:r(()=>[k(" mdi-alert-circle ")]),_:1})]),_:2},1032,["title"])):T("",!0)]),_:2},1032,["context-menu-items","onClick"])),[[P,()=>{h(o.domain)}]])),128))]),_:1})]),e("div",oe,[l(I,{color:"transparent",style:{height:"55px"}},{title:r(()=>[k(t(a.$t("settings.settings"))+" | "+t(a.$t("settings.server_info")),1)]),_:1}),l(A),l(B,null,{default:r(()=>[l(te,null,{default:r(()=>{var o,g,C,$,w;return[e("tbody",null,[e("tr",null,[e("td",null,t(a.$t("settings.server_id")),1),e("td",null,t((o=d(s).serverInfo.value)==null?void 0:o.server_id),1)]),e("tr",null,[e("td",null,t(a.$t("settings.server_version")),1),e("td",null,t((g=d(s).serverInfo.value)==null?void 0:g.server_version),1)]),(C=d(s).serverInfo.value)!=null&&C.homeassistant_addon?T("",!0):(b(),y("tr",le,[e("td",null,t(a.$t("settings.server_base_url")),1),e("td",null,t(($=d(s).serverInfo.value)==null?void 0:$.base_url),1)])),e("tr",null,[e("td",null,t(a.$t("settings.server_as_addon")),1),e("td",null,[l(D,{icon:(w=d(s).serverInfo.value)!=null&&w.homeassistant_addon?"mdi-check":"mdi-close"},null,8,["icon"])])]),e("tr",null,[e("td",null,t(a.$t("settings.artists_in_library")),1),e("td",null,t(f.value),1)]),e("tr",null,[e("td",null,t(a.$t("settings.albums_in_library")),1),e("td",null,t(_.value),1)]),e("tr",null,[e("td",null,t(a.$t("settings.tracks_in_library")),1),e("td",null,t(m.value),1)]),e("tr",null,[e("td",null,t(a.$t("settings.playlists_in_library")),1),e("td",null,t(v.value),1)]),e("tr",null,[e("td",null,t(a.$t("settings.radio_in_library")),1),e("td",null,t(c.value),1)]),e("tr",null,[e("td",null,t(a.$t("settings.server_logging")),1),e("td",null,[e("a",ie,t(a.$t("settings.download_log")),1)])])])]}),_:1})]),_:1})])],64)}}});export{pe as default};
