import{I as c}from"./ItemsListing-ByrUsYKd.js";import{d as p,r as i,s as l,m as d,v as e,a$ as y,q as f,h as _,u as o,M as b,o as v}from"./index-CD7iYaFT.js";import"./Container-ClW3AMEw.js";import"./index-CBho6rsP.js";import"./VContainer-DFqPxZ0T.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-B7AWyK9d.js";import"./VToolbar-BQejIjUR.js";import"./VBtn-B0XatuYF.js";import"./Button-BUjpiwEZ.js";import"./ListItem-C-HNqEeC.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dl2aFjrE.js";import"./VInput-DDFZ8lhb.js";import"./MediaItemThumb-BVMzVj0K.js";import"./PanelviewItemCompact-DmP5jPAL.js";import"./VSpacer-B8t0Vh55.js";import"./VTextField-CVfOZKc3.js";import"./VInfiniteScroll-DHXPR3PY.js";import"./layout-BCm0QQDS.js";import"./VRow-DFe5cA7D.js";import"./VVirtualScroll-BREm3RjH.js";import"./VAlert-cuze2JsR.js";const z=p({name:"Artists",__name:"LibraryArtists",setup(A){const s=i(!1),r=i(l.libraryArtistsCount),n=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"],u=async function(t){return s.value=!1,m(t),await e.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumArtistsFilter)},m=async function(t){if(!t.favoritesOnly&&!t.albumArtistsFilter){r.value=l.libraryArtistsCount;return}r.value=await e.getLibraryArtistsCount(t.favoritesOnly||!1,t.albumArtistsFilter||!1)};return d(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,a=>{a.object_id?.startsWith("library://artist")&&(s.value=!0)});f(t)}),(t,a)=>(v(),_(c,{itemtype:"artists",path:"libraryartists","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":u,"show-album-artists-only-filter":!0,"update-available":s.value,title:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0,"sort-keys":n,icon:"mdi-account-outline","restore-state":!0,total:r.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{o(e).startSync([o(b).ARTIST])},overflowAllowed:!0,disabled:o(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{z as default};
