import{C as _}from"./Container-BDz3QMuX.js";import{x as c,r as u,as as v,at as y,y as r,D as m,E as b,n as i,F as g,I as a,H as e,A as l,z as w,B as f,au as h}from"./index-CFvoaD7J.js";import{H as k}from"./HomeWidgetRow-DI_juZOM.js";import{T as C}from"./Toolbar-DNen7a-V.js";import{C as A}from"./VListItem-CSPID7yq.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-CzfHAKpA.js";/* empty css              */import"./PanelviewItemCompact-BQIsDE0n.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_4409cede_lang-41DbVClm.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-Ji67J6Pu.js";import"./VChip-Ccz1-bmn.js";import"./VList-fGk9SRdf.js";import"./VCardText-CpOuj25H.js";import"./VCard-DxLPF-Ra.js";import"./VMenu-9pSrU4Fo.js";import"./eventbus-CGRXT3Tn.js";import"./VCheckbox-B5r7QKHZ.js";import"./VCheckboxBtn-CRgZyCzV.js";import"./VToolbar-Da4d1W_R.js";import"./VAlert-CIiIOQza.js";const H=c({__name:"HomeWidgetRows",async setup(p){let s,o;const t=u({recently_played:{label:"recently_played",icon:"mdi-motion-play",items:[]},artists:{label:"artists",icon:"mdi-account-music",path:"/artists",items:[]},albums:{label:"albums",icon:"mdi-album",path:"/albums",items:[]},playlists:{label:"playlists",icon:"mdi-playlist-music",path:"/playlists",items:[]},tracks:{label:"tracks",icon:"mdi-file-music",path:"/tracks",items:[]},radios:{label:"radios",icon:"mdi-radio",path:"/radios",items:[]},browse:{label:"browse",icon:"mdi-folder",path:"/browse",items:[]}}),n=async function(){t.value.recently_played.items=await a.getRecentlyPlayedItems(10),t.value.artists.items=await a.getLibraryArtists(void 0,void 0,20,void 0,"random"),t.value.artists.count=e.libraryArtistsCount,t.value.albums.items=await a.getLibraryAlbums(void 0,void 0,20,void 0,"timestamp_added_desc"),t.value.albums.count=e.libraryAlbumsCount,t.value.playlists.items=await a.getLibraryPlaylists(void 0,void 0,20,void 0,"timestamp_added_desc"),t.value.playlists.count=e.libraryPlaylistsCount,t.value.radios.items=await a.getLibraryRadios(void 0,void 0,20,void 0,"timestamp_added_desc"),t.value.radios.count=e.libraryRadiosCount,t.value.tracks.items=await a.getLibraryTracks(void 0,void 0,20,void 0,"timestamp_added_desc"),t.value.tracks.count=e.libraryTracksCount};return[s,o]=v(()=>n()),await s,o(),y(()=>{n()}),(B,R)=>(r(!0),m(g,null,b(t.value,d=>(r(),m("div",{key:d.label},[i(k,{"widget-row":d},null,8,["widget-row"])]))),128))}}),L=c({__name:"HomeView",props:{player:{}},setup(p){const s=u(localStorage.getItem("frontend.settings.hide_settings")=="true");return(o,t)=>(r(),m("div",null,[i(C,{title:"Music Assistant","show-loading":!0,"menu-items":s.value?[]:[{label:"settings.settings",icon:"mdi-cog-outline",action:()=>{o.$router.push({path:"settings"})}}]},null,8,["menu-items"]),i(_,{variant:"panel"},{default:l(()=>[(r(),w(h,null,{fallback:l(()=>[i(A,{indeterminate:""})]),default:l(()=>[f("div",null,[i(H)])]),_:1}))]),_:1})]))}}),X=x(L,[["__scopeId","data-v-8ecfe1dc"]]);export{X as default};
