import{I as c}from"./ItemsListing-CqOkN5bP.js";import{d as p,i,s as n,j as u,m as e,a_ as y,l as _,e as f,u as s,M as b,o as v}from"./index-BLuBzgcR.js";import"./Container-BVutxj42.js";import"./index-CBho6rsP.js";import"./VContainer-DOe7JF0h.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-RSDUeNZR.js";import"./VToolbar-BFOvSQM-.js";import"./VBtn-i8gedOhv.js";import"./Button-BEhYIX-0.js";import"./ListItem-D3UfOTqB.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dwz4QKKd.js";import"./VInput-S8c2HXsf.js";import"./MediaItemThumb-4FqrTjbr.js";import"./PanelviewItemCompact-Czo8xJLH.js";import"./VSpacer-FdmIBMIx.js";import"./VTextField-BRzkPyuL.js";import"./VInfiniteScroll-XtiIpwbc.js";import"./layout-Dtt5lK8k.js";import"./VRow-Dw7kUaJt.js";import"./VVirtualScroll-JP5E3DQw.js";import"./VAlert-Du-laR0E.js";const F=p({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const o=i(!1),a=i(n.libraryPodcastsCount),l=["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,m(t),await e.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},m=async function(t){if(!t.favoritesOnly){a.value=n.libraryPodcastsCount;return}a.value=await e.getLibraryPodcastsCount(t.favoritesOnly||!1)};return u(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://podcast")&&(o.value=!0)});_(t)}),(t,r)=>(v(),f(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":l,"update-available":o.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-podcast","restore-state":!0,total:a.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{s(e).startSync([s(b).PODCAST])},overflowAllowed:!0,disabled:s(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{F as default};
