import{I as d}from"./ItemsListing-D_KqSTZS.js";import{ay as c,J as s,ax as a,a3 as p,aP as o,bb as f,a4 as v,aI as m,aA as y}from"./index-BRUnowC8.js";import"./Container-ZHtGcXZO.js";import"./index-kQIztB-E.js";import"./Toolbar-BEJzY0mB.js";import"./VToolbar-DS4mUdOC.js";import"./Button-BKv4xLAv.js";import"./ListItem-jfbxOrad.js";import"./userPreferences-DBWZCHKf.js";import"./VCheckboxBtn-D390s4L9.js";import"./VSelectionControl-Co1cRcmS.js";import"./MediaItemThumb-CIE9_Elw.js";import"./PanelviewItemCompact-CsJmi5IT.js";import"./VInfiniteScroll-BORsRMGl.js";import"./VVirtualScroll-htzu2YXu.js";import"./VAlert-DQxypmdN.js";const x=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(f.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(r.value=!0)});v(t)}),(t,i)=>(y(),m(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{x as default};
