import{I as p}from"./ItemsListing-eSLlPoYA.js";import{s as a,f as r,E as c}from"./index-Bd8s4WQO.js";import{d as u,r as i,o as m,a0 as f,D as v,u as _,aG as y,e as b}from"./lucide-CoF0tLOi.js";import"./Container-DJxyjctr.js";import"./index-kQIztB-E.js";import"./vuetify-DvOJDL5n.js";import"./Toolbar-Csr2CvSB.js";import"./userPreferences-Bdne_Wm-.js";import"./vue-router-BnXzVtNF.js";import"./Button-_r-XHGLU.js";import"./ListItem-DttNdje3.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-ZhN3thdv.js";import"./MediaItemThumb-g0UR8j3I.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-CShmTH81.js";import"./vue-i18n-Byo65gUq.js";import"./PanelviewItemCompact-CJHiqs4T.js";import"./qrcode-BbZu2DL4.js";import"./marked-D2lEcfQr.js";import"./color-BTziYnFN.js";import"./vueuse-uADb4LNz.js";/* empty css            */import"./swiper-CgqcFf1y.js";const z=u({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const e=i(!1),o=i(a.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=a.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)=>(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":e.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:_(y),"restore-state":!0,total:o.value,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{z as default};
