import{I as p}from"./ItemsListing-BPCoDFMa.js";import{Q as u,x as n,a2 as l,o as y,a4 as e,aS as _,b as f,R as b,a0 as s,a5 as v,S as h}from"./index-orrnp8a1.js";import"./MediaItemThumb-BFLLxiOJ.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-DgYavPcK.js";import"./VChip-DzIcRFdM.js";import"./VBtn-BJolvyKt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-BOpEb2vA.js";import"./VCheckbox-BaanYS4J.js";import"./VCheckboxBtn-CICj8ZxL.js";import"./PanelviewItemCompact-Bf1Qb2IB.js";import"./VSpacer-FMK5QbR9.js";/* empty css              */import"./Container-C-MxRHLg.js";import"./VContainer-DvR1uhzJ.js";import"./Toolbar-CE2HDv9i.js";import"./VToolbar-BlKUHnwt.js";import"./VTextField-DaF8PfrV.js";import"./VInfiniteScroll-CDme3Tib.js";import"./layout-BTr25AHs.js";import"./VRow-C4MwkXJh.js";import"./VVirtualScroll-Q9Rc10mA.js";import"./VAlert-BhQ3L7Kc.js";const z=u({name:"Podcasts",__name:"LibraryPodcasts",setup(w){const a=n(!1),o=n(l.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"],m=async function(t){return a.value=!1,c(t),await e.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},c=async function(t){if(!t.favoritesOnly){o.value=l.libraryPodcastsCount;return}o.value=await e.getLibraryPodcastsCount(t.favoritesOnly||!1)};return y(()=>{const t=e.subscribe(_.MEDIA_ITEM_ADDED,r=>{var i;(i=r.object_id)!=null&&i.startsWith("library://podcast")&&(a.value=!0)});f(t)}),(t,r)=>(h(),b(p,{itemtype:"podcasts",path:"librarypodcasts","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":m,"show-library":!0,"sort-keys":d,"update-available":a.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-podcast","restore-state":!0,total:o.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{s(e).startSync([s(v).PODCAST])},overflowAllowed:!0,disabled:s(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{z as default};
