import{I as d}from"./ItemsListing-COLlw5bq.js";import{aw as c,J as s,av as a,a3 as p,aN as o,b9 as v,a4 as f,aG as y,ay as m}from"./index-DhxwW1_d.js";import"./Container-D2fLqW0L.js";import"./index-kQIztB-E.js";import"./Toolbar-BfQbzcpc.js";import"./VToolbar-69Rn7taX.js";import"./Button-Dq6btUmD.js";import"./ListItem-DYjdeEgj.js";import"./userPreferences-Dy9_V1Qk.js";import"./VCheckboxBtn-DVNTnMLw.js";import"./MediaItemThumb-CBiFFPUA.js";import"./PanelviewItemCompact-KbS5CIFi.js";import"./VInfiniteScroll-Ce2Gi50Y.js";import"./VVirtualScroll-DTRxXskS.js";import"./VAlert-D-KKGAlc.js";const T=c({name:"Artists",__name:"LibraryArtists",setup(_){const r=s(!1),e=s(a.libraryArtistsCount),l=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"],n=async function(t){return r.value=!1,u(t),await o.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumArtistsFilter,t.provider&&t.provider.length>0?t.provider:void 0)},u=async function(t){if(!t.favoritesOnly&&!t.albumArtistsFilter&&!t.provider){e.value=a.libraryArtistsCount;return}if(t.provider&&t.provider.length>0){e.value=void 0;return}e.value=await o.getLibraryArtistsCount(t.favoritesOnly||!1,t.albumArtistsFilter||!1)};return p(()=>{const t=o.subscribe(v.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(r.value=!0)});f(t)}),(t,i)=>(m(),y(d,{itemtype:"artists",path:"libraryartists","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":n,"show-album-artists-only-filter":!0,"update-available":r.value,title:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0,"sort-keys":l,icon:"mdi-account-outline","restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","total"]))}});export{T as default};
