import{I as c}from"./ItemsListing-Cnfrbqt8.js";import{az as p,J as s,b7 as i,a3 as u,bc as a,bB as m,a4 as f,aF as v,aG as _,aE as y}from"./index-D2rF_80D.js";import{P as b}from"./podcast-0C3hw7Sn.js";import"./Container-C7yRkeCv.js";import"./index-kQIztB-E.js";import"./Toolbar-C66D0zTJ.js";import"./VToolbar-Db4qfa2C.js";import"./Button-CrfR8Gdt.js";import"./ListItem-CU9QYmiw.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cf4_7ViH.js";import"./MediaItemThumb-A-03axGx.js";import"./VCheckbox-DccbdgFZ.js";import"./VCheckboxBtn-Dik76WyM.js";import"./VSelectionControl-BHjDOTFl.js";import"./PanelviewItemCompact-BWonx8dk.js";import"./userPreferences-DWdlmlmR.js";import"./VInfiniteScroll-CfzetGUD.js";import"./VVirtualScroll-CG155sfU.js";import"./createLucideIcon-Bb8oGlVw.js";const J=p({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const o=s(!1),e=s(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 a.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){e.value=i.libraryPodcastsCount;return}if(t.provider&&t.provider.length>0){e.value=void 0;return}e.value=await a.getLibraryPodcastsCount(t.favoritesOnly||!1)};return u(()=>{const t=a.subscribe(m.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://podcast")&&(o.value=!0)});f(t)}),(t,r)=>(_(),v(c,{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(b),"restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{J as default};
