import{I as p}from"./ItemsListing-BOmO3Do4.js";import{Q as d,x as l,a2 as n,o as y,a4 as e,aY as f,b as _,R as b,a0 as o,a5 as v,S as A}from"./index-DxANhO1k.js";import"./MediaItemThumb-CFMeVmOC.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-DOvPB9zZ.js";import"./VBtn-BKDLm-Pz.js";import"./VCheckbox-DjCmGFGI.js";import"./VCheckboxBtn-CJJKU0Jh.js";import"./PanelviewItemCompact-CK0jmgCV.js";import"./VSpacer-DFaVs3iZ.js";/* empty css              */import"./Container-BWpo4_AD.js";import"./VContainer-Dt14Bz2c.js";import"./Toolbar-C8FmMECG.js";import"./VToolbar-CF24PT7R.js";import"./VTextField-Dsv55ZTU.js";import"./VInfiniteScroll-BUbVsPar.js";import"./layout-DxBddAEz.js";import"./VRow-DUKgywhZ.js";import"./VVirtualScroll-HpbJdiAg.js";import"./VAlert-C_Jv1M-3.js";const Y=d({name:"Artists",__name:"LibraryArtists",setup(h){const s=l(!1),a=l(n.libraryArtistsCount),u=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"],m=async function(t){return s.value=!1,c(t),await e.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumArtistsFilter)},c=async function(t){if(!t.favoritesOnly&&!t.albumArtistsFilter){a.value=n.libraryArtistsCount;return}a.value=await e.getLibraryArtistsCount(t.favoritesOnly||!1,t.albumArtistsFilter||!1)};return y(()=>{const t=e.subscribe(f.MEDIA_ITEM_ADDED,r=>{var i;(i=r.object_id)!=null&&i.startsWith("library://artist")&&(s.value=!0)});_(t)}),(t,r)=>(A(),b(p,{itemtype:"artists",path:"libraryartists","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":m,"show-album-artists-only-filter":!0,"update-available":s.value,title:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0,"sort-keys":u,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};
