import{I as p}from"./ItemsListing-D6AMqIYc.js";import{s as i,c as r,E as c}from"./index-CxiRlsCY.js";import{d as u,r as a,o as m,a0 as f,D as v,e as _,u as y,aw as b}from"./lucide-C2DU1LFb.js";import"./Container-CwfZ2VgM.js";import"./index-kQIztB-E.js";import"./vuetify-RelkxOq-.js";import"./utils-CDN07tui.js";import"./Toolbar-MwYpbj3t.js";import"./userPreferences-ln7cf3P6.js";import"./vue-router-BgJK_hRC.js";import"./Button-DBt8j7D4.js";import"./ListItem-DzUpG5Dm.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-D7lqdhVg.js";import"./MediaItemThumb-C7OhU3lK.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C17dV9_V.js";import"./vue-i18n-DySrp6mW.js";import"./PanelviewItemCompact-Cjl_ij1h.js";import"./qrcode-DSFhiIp2.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-DIaEWNCo.js";/* empty css            */import"./swiper-Jy9GbtzK.js";const G=u({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const e=a(!1),o=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 e.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)},l=async function(t){if(!t.favoritesOnly&&!t.provider){o.value=i.libraryPodcastsCount;return}if(t.provider&&t.provider.length>0){o.value=void 0;return}o.value=await r.getLibraryPodcastsCount(t.favoritesOnly||!1)};return m(()=>{const t=r.subscribe(c.MEDIA_ITEM_ADDED,s=>{s.object_id?.startsWith("library://podcast")&&(e.value=!0)});f(t)}),(t,s)=>(_(),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":e.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:y(b),"restore-state":!0,total:o.value,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{G as default};
