import{g as M,p as A,h as L,ah as P,A as N,B as u,H as R,I as F,ai as x,N as D,a as H,Q as S,x as U,o as X,a4 as n,a2 as d,Z as p,W as e,U as i,G as $,S as f,al as y,aa as t,$ as Y,R as T,a9 as w,af as z,ak as V,a0 as l,bn as E,bT as G,a3 as Q}from"./index-orrnp8a1.js";import{_ as W}from"./ProviderIcon.vue_vue_type_style_index_0_lang-DgYavPcK.js";import{L as Z}from"./ListItem-BOpEb2vA.js";import{C as B}from"./Container-C-MxRHLg.js";import{V as I}from"./VToolbar-BlKUHnwt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VBtn-BJolvyKt.js";import"./VContainer-DvR1uhzJ.js";/* empty css              */const j=A({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...D(),...x(),...F(),...R()},"VTable"),q=M()({name:"VTable",props:j(),setup(r,g){let{slots:s,emit:v}=g;const{themeClasses:_}=L(r),{densityClasses:a}=P(r);return N(()=>u(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":!!s.top,"v-table--has-bottom":!!s.bottom,"v-table--hover":r.hover},_.value,a.value,r.class],style:r.style},{default:()=>{var m,b,o;return[(m=s.top)==null?void 0:m.call(s),s.default?u("div",{class:"v-table__wrapper",style:{height:H(r.height)}},[u("table",null,[s.default()])]):(b=s.wrapper)==null?void 0:b.call(s),(o=s.bottom)==null?void 0:o.call(s)]}})),{}}}),J={style:{"margin-bottom":"10px"}},K={class:"line-clamp-1"},O={class:"line-clamp-1"},ee={style:{"margin-bottom":"10px"}},te={key:0},ae=["href"],ce=S({__name:"CoreConfigs",setup(r){const g=E(),s=U([]),v=function(a){g.push(`/settings/editcore/${a}`)},_=function(a,m){const b=[{label:"settings.configure",labelArgs:[],action:()=>{v(m.domain)},icon:"mdi-cog"},{label:"settings.documentation",labelArgs:[],action:()=>{G(n.providerManifests[m.domain].documentation)},icon:"mdi-bookshelf",disabled:!n.providerManifests[m.domain].documentation}];Q.emit("contextmenu",{items:b,posX:a.clientX,posY:a.clientY})};return X(async()=>{s.value=await n.getCoreConfigs(),d.libraryArtistsCount=await n.getLibraryArtistsCount(),d.libraryAlbumsCount=await n.getLibraryAlbumsCount(),d.libraryTracksCount=await n.getLibraryTracksCount(),d.libraryPlaylistsCount=await n.getLibraryPlaylistsCount(),d.libraryRadiosCount=await n.getLibraryRadiosCount()}),(a,m)=>{const b=z("Button");return f(),p($,null,[e("div",J,[u(I,{color:"transparent"},{title:i(()=>[y(t(a.$t("settings.core_modules")),1)]),_:1}),u(B,null,{default:i(()=>[(f(!0),p($,null,Y(s.value.sort((o,c)=>l(n).providerManifests[o.domain].name.localeCompare(l(n).providerManifests[c.domain].name)),o=>(f(),T(Z,{key:o.domain,"show-menu-btn":"",class:"list-item-main",link:"",onMenu:c=>_(c,o),onClick:c=>v(o.domain)},{prepend:i(()=>[u(W,{domain:o.domain,size:40,class:"listitem-media-thumb",style:{"margin-left":"10px"}},null,8,["domain"])]),title:i(()=>[e("div",K,t(l(n).providerManifests[o.domain].name),1)]),subtitle:i(()=>[e("div",O,t(l(n).providerManifests[o.domain].description),1)]),append:i(()=>[o.last_error?(f(),T(b,{key:0,icon:"",title:o.last_error},{default:i(()=>[u(V,{color:"red"},{default:i(()=>m[0]||(m[0]=[y(" mdi-alert-circle ")])),_:1})]),_:2},1032,["title"])):w("",!0)]),_:2},1032,["onMenu","onClick"]))),128))]),_:1})]),e("div",ee,[u(I,{color:"transparent"},{title:i(()=>[y(t(a.$t("settings.server_info")),1)]),_:1}),u(B,null,{default:i(()=>[u(q,null,{default:i(()=>{var o,c,h,C,k;return[e("tbody",null,[e("tr",null,[e("td",null,t(a.$t("settings.server_id")),1),e("td",null,t((o=l(n).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((c=l(n).serverInfo.value)==null?void 0:c.server_version),1)]),(h=l(n).serverInfo.value)!=null&&h.homeassistant_addon?w("",!0):(f(),p("tr",te,[e("td",null,t(a.$t("settings.server_base_url")),1),e("td",null,t((C=l(n).serverInfo.value)==null?void 0:C.base_url),1)])),e("tr",null,[e("td",null,t(a.$t("settings.server_as_addon")),1),e("td",null,[u(V,{icon:(k=l(n).serverInfo.value)!=null&&k.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(l(d).libraryArtistsCount),1)]),e("tr",null,[e("td",null,t(a.$t("settings.albums_in_library")),1),e("td",null,t(l(d).libraryAlbumsCount),1)]),e("tr",null,[e("td",null,t(a.$t("settings.tracks_in_library")),1),e("td",null,t(l(d).libraryTracksCount),1)]),e("tr",null,[e("td",null,t(a.$t("settings.playlists_in_library")),1),e("td",null,t(l(d).libraryPlaylistsCount),1)]),e("tr",null,[e("td",null,t(a.$t("settings.radio_in_library")),1),e("td",null,t(l(d).libraryRadiosCount),1)]),e("tr",null,[e("td",null,t(a.$t("settings.server_logging")),1),e("td",null,[e("a",{href:`${l(n).baseUrl}/music-assistant.log`,target:"_blank"},t(a.$t("settings.download_log")),9,ae)])])])]}),_:1})]),_:1})])],64)}}});export{ce as default};
