import{I as c}from"./ItemsListing-BHlkb6-j.js";import{d as p,i,s as l,j as d,m as e,a_ as y,l as f,e as _,o as b,u as r,M as v}from"./index-LFx1jIjH.js";import"./Container-CuH2YNr5.js";import"./Button-SUce42c3.js";import"./VBtn-BYKkZzw0.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-or1Uze2V.js";/* empty css              */import"./Toolbar-iQxHKI_C.js";import"./VToolbar-Dc2WDt1C.js";import"./ListItem-DhvO1M3C.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B4veTxLS.js";import"./VInput-B3Z2GK8Z.js";import"./MediaItemThumb-cYqdWFcl.js";import"./PanelviewItemCompact-Bf82DAtE.js";import"./VSpacer-Cg-cZSyv.js";import"./VTextField-DyzwZgKh.js";import"./VInfiniteScroll-DH2IK80_.js";import"./layout-C6GuZOkj.js";import"./VRow-cyJLSUM5.js";import"./VVirtualScroll-DYZmdOFl.js";import"./VAlert-Cyb25ra3.js";const q=p({name:"Artists",__name:"LibraryArtists",setup(A){const s=i(!1),o=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){o.value=l.libraryArtistsCount;return}o.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)=>(b(),_(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:o.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{r(e).startSync([r(v).ARTIST])},overflowAllowed:!0,disabled:r(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{q as default};
