import{I as c}from"./ItemsListing-CHZs9N6z.js";import{a7 as m,F as o,a6 as i,L as p,ap as a,aN as d,N as f,ai as y,a9 as _}from"./index-CFcIX8RO.js";import"./Container-iGBsqgnx.js";import"./index-kQIztB-E.js";import"./Toolbar-DambSy-S.js";import"./VToolbar-B_3_MVxk.js";import"./Button-IxLZkOI0.js";import"./ListItem-CWPLlf7K.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CGTv89Z9.js";import"./VCheckboxBtn-Dy9mjR59.js";import"./MediaItemThumb-oOnMmU-2.js";import"./PanelviewItemCompact-YHP34gKS.js";import"./VInfiniteScroll-DY-7nfIB.js";import"./VVirtualScroll-BRrQ8Y7O.js";import"./VAlert-DZurr_D6.js";const T=m({name:"Artists",__name:"LibraryArtists",setup(b){const e=o(!1),s=o(i.libraryArtistsCount),l=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"],n=async function(t){return e.value=!1,u(t),await a.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumArtistsFilter)},u=async function(t){if(!t.favoritesOnly&&!t.albumArtistsFilter){s.value=i.libraryArtistsCount;return}s.value=await a.getLibraryArtistsCount(t.favoritesOnly||!1,t.albumArtistsFilter||!1)};return p(()=>{const t=a.subscribe(d.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://artist")&&(e.value=!0)});f(t)}),(t,r)=>(_(),y(c,{itemtype:"artists",path:"libraryartists","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":n,"show-album-artists-only-filter":!0,"update-available":e.value,title:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0,"sort-keys":l,icon:"mdi-account-outline","restore-state":!0,total:s.value},null,8,["update-available","title","total"]))}});export{T as default};
