import{I as d}from"./ItemsListing-BXtc3hUZ.js";import{s,c as o,E as p}from"./index-DxsXRykZ.js";import{d as c,r as a,o as m,a2 as f,D as v,e as y,B as _,aq as b}from"./lucide-PBDL9g_H.js";import"./Container--1QUHYu8.js";import"./index-kQIztB-E.js";import"./vuetify-D_QaYjDz.js";import"./Toolbar-9-YOUynV.js";import"./vue-router-BTykswgC.js";import"./Button-ByZOHWco.js";import"./ListItem-CBSubOHZ.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DELv5odx.js";import"./MediaItemThumb-BK1p2KOk.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BEUhvHYU.js";import"./vue-i18n-CYwaof5n.js";import"./PanelviewItemCompact-D3zTXMMR.js";import"./userPreferences-CeeapS2c.js";import"./qrcode-CCr-KruI.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-w9cS6Vug.js";/* empty css            */import"./swiper-BLmWk8fI.js";const z=c({name:"Artists",__name:"LibraryArtists",setup(h){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)},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 m(()=>{const t=o.subscribe(p.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(r.value=!0)});f(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{z as default};
