import{I as c}from"./ItemsListing-CqOkN5bP.js";import{d as p,i,s as l,j as d,m as e,a_ as y,l as f,e as _,u as r,M as b,o as v}from"./index-BLuBzgcR.js";import"./Container-BVutxj42.js";import"./index-CBho6rsP.js";import"./VContainer-DOe7JF0h.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-RSDUeNZR.js";import"./VToolbar-BFOvSQM-.js";import"./VBtn-i8gedOhv.js";import"./Button-BEhYIX-0.js";import"./ListItem-D3UfOTqB.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dwz4QKKd.js";import"./VInput-S8c2HXsf.js";import"./MediaItemThumb-4FqrTjbr.js";import"./PanelviewItemCompact-Czo8xJLH.js";import"./VSpacer-FdmIBMIx.js";import"./VTextField-BRzkPyuL.js";import"./VInfiniteScroll-XtiIpwbc.js";import"./layout-Dtt5lK8k.js";import"./VRow-Dw7kUaJt.js";import"./VVirtualScroll-JP5E3DQw.js";import"./VAlert-Du-laR0E.js";const z=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)=>(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:o.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{r(e).startSync([r(b).ARTIST])},overflowAllowed:!0,disabled:r(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{z as default};
