import{I as c}from"./ItemsListing-BNF8UGX2.js";import{x as u,r as n,H as l,o as y,I as e,ah as _,b as f,y as b,G as s,M as v,z as h}from"./index-DKhfhZyI.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_cee6bfa4_lang-BEm2OpTr.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C_Zsg23g.js";import"./VListItem-DG7fZYqG.js";import"./VMenu-BTA9m0lg.js";import"./VCard-AQsAsy9j.js";import"./VCardText-PK-MK26S.js";import"./VList-BsIdJYb-.js";import"./VChip-Bt-2eXUN.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-hgXNSQeh.js";import"./VCheckbox-w4Dp7feX.js";import"./VCheckboxBtn-SjULh2vZ.js";import"./PanelviewItemCompact-BXu7orP5.js";import"./VSpacer-lTIuHyc5.js";/* empty css              */import"./Container-DdZvDMit.js";import"./VContainer-bkYdVay1.js";import"./Toolbar-DfTAf723.js";import"./VToolbar-Be3D-k7i.js";import"./VTextField-C_1U2QFr.js";import"./VInfiniteScroll-s1qKdTFY.js";import"./layout-MVvGEKAO.js";import"./VRow-C3_3R0pl.js";import"./VVirtualScroll-DrLqMq8M.js";import"./VAlert-EFQTLSCo.js";const R=u({name:"Podcasts",__name:"LibraryPodcasts",setup(w){const o=n(!1),a=n(l.libraryPodcastsCount),m=["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"],p=async function(t){return o.value=!1,d(t),await e.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},d=async function(t){if(!t.favoritesOnly){a.value=l.libraryPodcastsCount;return}a.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")&&(o.value=!0)});f(t)}),(t,r)=>(h(),b(c,{itemtype:"podcasts",path:"librarypodcasts","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":p,"show-library":!0,"sort-keys":m,"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(v).PODCAST])},overflowAllowed:!0,disabled:s(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{R as default};
