import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-B_OXjTPr.js";import{I}from"./ItemsListing-D_KqSTZS.js";import{ay as _,J as m,L as h,a3 as b,aP as o,bb as y,a4 as k,az as w,aA as s,o as E,aI as p,aB as n,ah as D}from"./index-BRUnowC8.js";import"./Toolbar-BEJzY0mB.js";import"./VToolbar-DS4mUdOC.js";import"./marquee_text_sync-BajKmu-m.js";import"./MediaItemThumb-CIE9_Elw.js";import"./VDialog-Bh3mGVOy.js";import"./Container-ZHtGcXZO.js";import"./index-kQIztB-E.js";import"./ListItem-jfbxOrad.js";import"./Button-BKv4xLAv.js";import"./userPreferences-DBWZCHKf.js";import"./VCheckboxBtn-D390s4L9.js";import"./VSelectionControl-Co1cRcmS.js";import"./PanelviewItemCompact-CsJmi5IT.js";import"./VInfiniteScroll-BORsRMGl.js";import"./VVirtualScroll-htzu2YXu.js";import"./VAlert-DQxypmdN.js";const G=_({__name:"PodcastDetails",props:{itemId:{},provider:{}},setup(l){const e=l,i=m(!1),t=m(),d=async function(){t.value=await o.getPodcast(e.itemId,e.provider)};h(()=>e.itemId,a=>{a&&d()},{immediate:!0}),b(()=>{const a=o.subscribe(y.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(),p(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(),p(v,{key:1,"item-details":t.value},null,8,["item-details"])):n("",!0)],64))}});export{G as default};
