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