import{I as c}from"./ItemsListing-t4zttHcu.js";import{U as p,x as i,a4 as l,o as d,a6 as e,aY as y,b as f,W as _,X as b,a2 as o,a7 as v}from"./index-B-lUZalq.js";import"./Container-Br6JH6Pm.js";import"./Button-kSJGA_Pw.js";import"./VBtn-BPJ1JKW-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-DB65WVbe.js";/* empty css              */import"./Toolbar-BvxWbi_E.js";import"./VToolbar-RljK0PC9.js";import"./ListItem-LV_WU--g.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DnroVGI-.js";import"./VInput-BWBQqjuk.js";import"./MediaItemThumb-DapaMoP4.js";import"./PanelviewItemCompact-CIDxIfoQ.js";import"./VSpacer-DDLrofv-.js";import"./VTextField-B-d5Pe9I.js";import"./VInfiniteScroll-CKZj-VKd.js";import"./layout-BuzUTwrQ.js";import"./VRow-BQOTE9C_.js";import"./VVirtualScroll-CceW16X7.js";import"./VAlert-QHTIcuEJ.js";const Y=p({name:"Artists",__name:"LibraryArtists",setup(A){const s=i(!1),a=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){a.value=l.libraryArtistsCount;return}a.value=await e.getLibraryArtistsCount(t.favoritesOnly||!1,t.albumArtistsFilter||!1)};return d(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://artist")&&(s.value=!0)});f(t)}),(t,r)=>(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:a.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{o(e).startSync([o(v).ARTIST])},overflowAllowed:!0,disabled:o(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{Y as default};
