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