import{I as p}from"./ItemsListing-DPwGMIFn.js";import{s as i,a as r,E as u}from"./index-kY2ogzee.js";import{d as c,r as a,o as m,a0 as f,D as v,u as _,aM as y,e as b}from"./lucide-F1B1VpI-.js";import"./Container-BqMgcqYk.js";import"./index-kQIztB-E.js";import"./vuetify-BRgYuWPG.js";import"./Toolbar-C61KVfBU.js";import"./userPreferences-C7D1i_aa.js";import"./vue-router-BpTQq1WE.js";import"./Button-Cu6LWeuU.js";import"./ListItem-3s6ilAzq.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CzKuoqNh.js";import"./MediaItemThumb-_5dkggHo.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-uVygDr2P.js";import"./vue-i18n-fACdQrNQ.js";import"./PanelviewItemCompact-k5yZ7Vdt.js";import"./color-CcshWhNz.js";import"./qrcode-0NlyE7mq.js";import"./marked-i_gIkIP3.js";import"./vueuse-D-YfxAQp.js";/* empty css            */import"./swiper-Bthg8aDK.js";const F=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{F as default};
