import{I as c}from"./ItemsListing-6VW59A0B.js";import{av as p,H as i,au as l,a3 as d,aL as e,b6 as y,a4 as f,aD as _,az as r,aM as b,ax as v}from"./index-C-Ivu3jU.js";import"./Container-DVyc_Yt_.js";import"./index-kQIztB-E.js";import"./VContainer-CNNJtZg6.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-CLPRlZ-4.js";import"./VToolbar-DTucOBiF.js";import"./Button-FtStaD9_.js";import"./ListItem-BLmrgznL.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B5IzKSW4.js";import"./VCheckboxBtn-BmKOjEU4.js";import"./VInput-CnrZS6Kh.js";import"./MediaItemThumb-BsXB7IV6.js";import"./PanelviewItemCompact-5_ppRL3T.js";import"./VTextField-Bkx949P5.js";import"./VSnackbar-C_PtJN1U.js";import"./layout-D2NB7OTD.js";import"./VRow-DOG0WeJD.js";import"./VVirtualScroll-C_Lzj3jv.js";import"./VAlert-B3qbTkCR.js";const U=p({name:"Artists",__name:"LibraryArtists",setup(A){const a=i(!1),s=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 a.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){s.value=l.libraryArtistsCount;return}s.value=await e.getLibraryArtistsCount(t.favoritesOnly||!1,t.albumArtistsFilter||!1)};return d(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,o=>{o.object_id?.startsWith("library://artist")&&(a.value=!0)});f(t)}),(t,o)=>(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":a.value,title:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0,"sort-keys":n,icon:"mdi-account-outline","restore-state":!0,total:s.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{U as default};
