import{I as m}from"./ItemsListing-C49HRbSG.js";import{av as p,H as i,au as n,a3 as u,aL as e,b6 as y,a4 as _,aD as f,az as s,aM as b,ax as v}from"./index-9wFVyQJF.js";import"./Container-BJrCSObY.js";import"./index-kQIztB-E.js";import"./VContainer-Bmll2nQh.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-DKtKPcsg.js";import"./VToolbar-BKGXqxdt.js";import"./Button-C-VEz_LI.js";import"./ListItem-UwdbG-Br.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-BsGozMKb.js";import"./VCheckboxBtn-DtwUx7x8.js";import"./VInput-Bym6CXFb.js";import"./MediaItemThumb-CIzEvLC1.js";import"./PanelviewItemCompact-Bh2HNG1g.js";import"./VTextField-DJZc05eK.js";import"./VSnackbar-B7zT2MUe.js";import"./layout-BdbtgIRG.js";import"./VRow-plcqQvnb.js";import"./VVirtualScroll-H5Wikvf-.js";import"./VAlert-D47QZ7qK.js";const W=p({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const a=i(!1),o=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 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=n.libraryPodcastsCount;return}o.value=await e.getLibraryPodcastsCount(t.favoritesOnly||!1)};return u(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://podcast")&&(a.value=!0)});_(t)}),(t,r)=>(v(),f(m,{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":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(b).PODCAST])},overflowAllowed:!0,disabled:s(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{W as default};
