import{C}from"./Container-CuH2YNr5.js";import{L as V}from"./ListItem-DhvO1M3C.js";import{x as B,y as I,O as L,X as M,C as P,b as u,D as A,E as D,R as N,G as R,a8 as F,I as x,aG as S,a as e,a4 as z,d as X,i as E,j as G,m as n,s as d,c as p,o as c,w as o,F as h,b4 as y,t,r as H,e as k,q as $,L as U,g as T,u as l,v as Y,bJ as j,ce as q,k as J}from"./index-LFx1jIjH.js";import{V as w}from"./VToolbar-Dc2WDt1C.js";import"./Button-SUce42c3.js";import"./VBtn-BYKkZzw0.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-or1Uze2V.js";/* empty css              */const O=I({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:a=>["even","odd"].includes(a)},...x(),...F(),...R(),...N()},"VTable"),K=B()({name:"VTable",props:O(),setup(a,v){let{slots:r,emit:f}=v;const{themeClasses:g}=L(a),{densityClasses:s}=M(a);return P(()=>{const m={VCheckboxBtn:{density:a.density}};return u(a.tag,{class:D(["v-table",{"v-table--fixed-height":!!a.height,"v-table--fixed-header":a.fixedHeader,"v-table--fixed-footer":a.fixedFooter,"v-table--has-top":!!r.top,"v-table--has-bottom":!!r.bottom,"v-table--hover":a.hover,"v-table--striped-even":a.striped==="even","v-table--striped-odd":a.striped==="odd"},g.value,s.value,a.class]),style:A(a.style)},{default:()=>[r.top?.(),u(S,{defaults:m},{default:()=>[r.default?e("div",{class:"v-table__wrapper",style:{height:z(a.height)}},[e("table",null,[r.default()])]):r.wrapper?.()]}),r.bottom?.()]})}),{}}}),Q={style:{"margin-bottom":"10px"}},W={class:"line-clamp-1"},Z={class:"line-clamp-1"},ee={style:{"margin-bottom":"10px"}},te={key:0},se=["href"],ce=X({__name:"CoreConfigs",setup(a){const v=j(),r=E([]),f=function(s){v.push(`/settings/editcore/${s}`)},g=function(s,m){const _=[{label:"settings.configure",labelArgs:[],action:()=>{f(m.domain)},icon:"mdi-cog"},{label:"settings.documentation",labelArgs:[],action:()=>{q(n.providerManifests[m.domain].documentation)},icon:"mdi-bookshelf",disabled:!n.providerManifests[m.domain].documentation}];J.emit("contextmenu",{items:_,posX:s.clientX,posY:s.clientY})};return G(async()=>{r.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()}),(s,m)=>{const _=U("Button");return c(),p(h,null,[e("div",Q,[u(w,{color:"transparent"},{title:o(()=>[y(t(s.$t("settings.core_modules")),1)]),_:1}),u(C,null,{default:o(()=>[(c(!0),p(h,null,H(r.value.sort((i,b)=>l(n).providerManifests[i.domain].name.localeCompare(l(n).providerManifests[b.domain].name)),i=>(c(),k(V,{key:i.domain,"show-menu-btn":"",class:"list-item-main",link:"",onMenu:b=>g(b,i),onClick:b=>f(i.domain)},{prepend:o(()=>[u(Y,{domain:i.domain,size:40,class:"listitem-media-thumb",style:{"margin-left":"10px"}},null,8,["domain"])]),title:o(()=>[e("div",W,t(l(n).providerManifests[i.domain].name),1)]),subtitle:o(()=>[e("div",Z,t(l(n).providerManifests[i.domain].description),1)]),append:o(()=>[i.last_error?(c(),k(_,{key:0,icon:"",title:i.last_error},{default:o(()=>[u(T,{color:"red"},{default:o(()=>[...m[0]||(m[0]=[y(" mdi-alert-circle ",-1)])]),_:1})]),_:1},8,["title"])):$("",!0)]),_:2},1032,["onMenu","onClick"]))),128))]),_:1})]),e("div",ee,[u(w,{color:"transparent"},{title:o(()=>[y(t(s.$t("settings.server_info")),1)]),_:1}),u(C,null,{default:o(()=>[u(K,null,{default:o(()=>[e("tbody",null,[e("tr",null,[e("td",null,t(s.$t("settings.server_id")),1),e("td",null,t(l(n).serverInfo.value?.server_id),1)]),e("tr",null,[e("td",null,t(s.$t("settings.server_version")),1),e("td",null,t(l(n).serverInfo.value?.server_version),1)]),l(n).serverInfo.value?.homeassistant_addon?$("",!0):(c(),p("tr",te,[e("td",null,t(s.$t("settings.server_base_url")),1),e("td",null,t(l(n).serverInfo.value?.base_url),1)])),e("tr",null,[e("td",null,t(s.$t("settings.server_as_addon")),1),e("td",null,[u(T,{icon:l(n).serverInfo.value?.homeassistant_addon?"mdi-check":"mdi-close"},null,8,["icon"])])]),e("tr",null,[e("td",null,t(s.$t("settings.artists_in_library")),1),e("td",null,t(l(d).libraryArtistsCount),1)]),e("tr",null,[e("td",null,t(s.$t("settings.albums_in_library")),1),e("td",null,t(l(d).libraryAlbumsCount),1)]),e("tr",null,[e("td",null,t(s.$t("settings.tracks_in_library")),1),e("td",null,t(l(d).libraryTracksCount),1)]),e("tr",null,[e("td",null,t(s.$t("settings.playlists_in_library")),1),e("td",null,t(l(d).libraryPlaylistsCount),1)]),e("tr",null,[e("td",null,t(s.$t("settings.radio_in_library")),1),e("td",null,t(l(d).libraryRadiosCount),1)]),e("tr",null,[e("td",null,t(s.$t("settings.server_logging")),1),e("td",null,[e("a",{href:`${l(n).baseUrl}/music-assistant.log`,target:"_blank"},t(s.$t("settings.download_log")),9,se)])])])]),_:1})]),_:1})])],64)}}});export{ce as default};
