import{I as c}from"./ItemsListing-p3UDrkaz.js";import{ay as p,J as s,ax as i,a3 as u,aP as a,bc as m,a4 as f,aI as v,aA as _}from"./index-D-FY8Yx2.js";import"./Container-C7DumkgJ.js";import"./index-kQIztB-E.js";import"./Toolbar-CxAnowGj.js";import"./VToolbar-BGzu4h11.js";import"./Button-B57MCuAc.js";import"./ListItem-CX5q61ih.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B1j6uBGW.js";import"./MediaItemThumb-CzEoSAF3.js";import"./VCheckbox-W6o6QHjE.js";import"./VCheckboxBtn-DpMGI-si.js";import"./VSelectionControl-CyrHFsUF.js";import"./PanelviewItemCompact-BY3CNldl.js";import"./userPreferences-7uBq50Yx.js";import"./VInfiniteScroll-CRxNfWga.js";import"./VVirtualScroll-cGuYysLa.js";const j=p({name:"Podcasts",__name:"LibraryPodcasts",setup(y){const o=s(!1),e=s(i.libraryPodcastsCount),d=["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"],l=async function(t){return o.value=!1,n(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)},n=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":l,"show-library":!0,"sort-keys":d,"update-available":o.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-podcast","restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","total"]))}});export{j as default};
