import{I as p}from"./ItemsListing-CMebSJMP.js";import{s as i,a as r,E as u}from"./index-DtW9qkyP.js";import{d as c,r as a,o as m,a3 as f,G as v,u as _,aQ as y,b}from"./lucide-6UWTdd2w.js";import"./Container-Ezr7UjSA.js";import"./index-kQIztB-E.js";import"./vuetify-C-X2RQxn.js";import"./Toolbar-D7y4hgTx.js";import"./userPreferences-EbW-NHaE.js";import"./vue-router-DseMGm2G.js";import"./Button-DUyYmdJS.js";import"./ListItem-hEwRdwaQ.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-ChrddRO9.js";import"./MediaItemThumb-D3_5fXG4.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BOiMcynO.js";import"./vue-i18n-QBroYIqB.js";import"./PanelviewItemCompact-DAT2uNcI.js";import"./qrcode-DG5BmHWw.js";import"./marked-BPdRUrA1.js";import"./color-CqFg8eif.js";import"./vueuse-ulR2KBc1.js";/* empty css            */import"./swiper-7FOSZ2nt.js";const q=c({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const o=a(!1),e=a(i.libraryPodcastsCount),n=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","timestamp_modified","timestamp_modified_desc","last_played","last_played_desc","play_count","play_count_desc"],d=async function(t){return o.value=!1,l(t),await r.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.provider&&t.provider.length>0?t.provider:void 0,t.genreIds)},l=async function(t){if(!t.favoritesOnly&&!t.provider){e.value=i.libraryPodcastsCount;return}if(t.provider&&t.provider.length>0){e.value=void 0;return}e.value=await r.getLibraryPodcastsCount(t.favoritesOnly||!1)};return m(()=>{const t=r.subscribe(u.MEDIA_ITEM_ADDED,s=>{s.object_id?.startsWith("library://podcast")&&(o.value=!0)});f(t)}),(t,s)=>(b(),v(p,{itemtype:"podcasts",path:"librarypodcasts","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":d,"show-library":!0,"sort-keys":n,"update-available":o.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:_(y),"restore-state":!0,total:e.value,"show-provider-filter":!0,"show-genre-filter":!0},null,8,["update-available","title","icon","total"]))}});export{q as default};
