import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-BKRBxfS6.js";import{I}from"./ItemsListing-CHZs9N6z.js";import{a7 as _,F as p,M as h,L as y,ap as o,aN as b,N as k,a8 as w,a9 as s,o as E,ai as m,aa as n,a0 as D}from"./index-CFcIX8RO.js";import"./Toolbar-DambSy-S.js";import"./VToolbar-B_3_MVxk.js";import"./marquee_text_sync-gXoJPEDk.js";import"./MediaItemThumb-oOnMmU-2.js";import"./VDialog-C2cPU7vi.js";import"./Container-iGBsqgnx.js";import"./index-kQIztB-E.js";import"./ListItem-CWPLlf7K.js";import"./Button-IxLZkOI0.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CGTv89Z9.js";import"./VCheckboxBtn-Dy9mjR59.js";import"./PanelviewItemCompact-YHP34gKS.js";import"./VInfiniteScroll-DY-7nfIB.js";import"./VVirtualScroll-BRrQ8Y7O.js";import"./VAlert-DZurr_D6.js";const G=_({__name:"PodcastDetails",props:{itemId:{},provider:{}},setup(l){const e=l,i=p(!1),t=p(),d=async function(){t.value=await o.getPodcast(e.itemId,e.provider)};h(()=>e.itemId,a=>{a&&d()},{immediate:!0}),y(()=>{const a=o.subscribe(b.MEDIA_ITEM_UPDATED,r=>{const c=r.data;t.value?.uri==c.uri&&(i.value=!0)});k(a)});const u=async function(a){return await o.getPodcastEpisodes(e.itemId,e.provider)};return(a,r)=>(s(),w(D,null,[E(f,{item:t.value},null,8,["item"]),t.value?(s(),m(I,{key:0,itemtype:"podcastepisodes","parent-item":t.value,"show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!0,"show-refresh-button":!0,"load-items":u,"sort-keys":["position","position_desc","name","duration","duration_desc"],"update-available":i.value,title:a.$t("podcast_episodes"),"allow-key-hooks":!0,path:`podcast.${e.itemId}.${e.provider}`,"restore-state":!0,"no-server-side-sorting":!0},null,8,["parent-item","update-available","title","path"])):n("",!0),t.value?(s(),m(v,{key:1,"item-details":t.value},null,8,["item-details"])):n("",!0)],64))}});export{G as default};
