import{_ as d}from"./ArtistIcon.vue_vue_type_script_setup_true_lang-BZnfIFg8.js";import{I as p}from"./ItemsListing-CpFqjg3Z.js";import{s,f as o,E as m}from"./index-CdlFFqg6.js";import{d as f,r as a,o as c,a0 as v,D as _,e as y}from"./lucide-CBD6ds6z.js";import"./Container-Ca7CVKH1.js";import"./index-kQIztB-E.js";import"./vuetify-CWqEgugS.js";import"./Toolbar-DiwObUQi.js";import"./userPreferences-BCBfOZnG.js";import"./vue-router-CC0l42eb.js";import"./Button-JgfGwZuo.js";import"./ListItem-DwNfkvjD.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DfAaDAqX.js";import"./MediaItemThumb-23rc-j31.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-Q52AZGCD.js";import"./vue-i18n-CmUBtFNG.js";import"./PanelviewItemCompact-DZz3Aa90.js";import"./qrcode-DZillSNb.js";import"./marked-i_gIkIP3.js";import"./color-BTziYnFN.js";import"./vueuse-CTJ2ks5r.js";/* empty css            */import"./swiper-Dlz_0V0t.js";const G=f({name:"Artists",__name:"LibraryArtists",setup(b){const r=a(!1),e=a(s.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,t.genreIds)},u=async function(t){if(!t.favoritesOnly&&!t.albumArtistsFilter&&!t.provider){e.value=s.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(m.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(r.value=!0)});v(t)}),(t,i)=>(y(),_(p,{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,"show-genre-filter":!0,"sort-keys":l,icon:d,"restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","total"]))}});export{G as default};
