import{I as d}from"./ItemsListing-Cnfrbqt8.js";import{az as p,J as s,b7 as a,a3 as c,bc as o,bB as f,a4 as m,aF as v,aG as y,aE as _}from"./index-D2rF_80D.js";import{U as b}from"./user-round-C7trb2Kq.js";import"./Container-C7yRkeCv.js";import"./index-kQIztB-E.js";import"./Toolbar-C66D0zTJ.js";import"./VToolbar-Db4qfa2C.js";import"./Button-CrfR8Gdt.js";import"./ListItem-CU9QYmiw.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cf4_7ViH.js";import"./MediaItemThumb-A-03axGx.js";import"./VCheckbox-DccbdgFZ.js";import"./VCheckboxBtn-Dik76WyM.js";import"./VSelectionControl-BHjDOTFl.js";import"./PanelviewItemCompact-BWonx8dk.js";import"./userPreferences-DWdlmlmR.js";import"./VInfiniteScroll-CfzetGUD.js";import"./VVirtualScroll-CG155sfU.js";import"./createLucideIcon-Bb8oGlVw.js";const J=p({name:"Artists",__name:"LibraryArtists",setup(h){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 c(()=>{const t=o.subscribe(f.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(r.value=!0)});m(t)}),(t,i)=>(y(),v(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:_(b),"restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{J as default};
