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