import{I as p}from"./ItemsListing-qbrwPxiP.js";import{s as i,a as r,E as u}from"./index-DWmajnYM.js";import{d as c,r as a,o as m,a3 as f,G as v,u as _,aU as y,e as b}from"./lucide-8Ndi-dzR.js";import"./Container-D6gxwBlv.js";import"./index-kQIztB-E.js";import"./vuetify-CWmv6NQj.js";import"./Toolbar-Br-KVOYm.js";import"./userPreferences-Cyj0mtSc.js";import"./vue-router-BUuMIcmK.js";import"./Button-EIrzt17E.js";import"./ListItem-Dtcq0QPQ.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CQ6cOZVB.js";import"./MediaItemThumb-NjUBMb1A.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-dojdrEBX.js";import"./vue-i18n-CseyGfr9.js";import"./PanelviewItemCompact-BjMSGsqA.js";import"./qrcode-C87QbhKD.js";import"./marked-D9eDbhZJ.js";import"./color-CqFg8eif.js";import"./vueuse-BJLUrvf_.js";/* empty css            */import"./swiper-COEfQC5v.js";const z=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{z as default};
