import{I as v,_ as I}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-C7zJx_G7.js";import{I as _}from"./ItemsListing-BPCoDFMa.js";import{Q as h,x as p,w as b,o as w,a4 as a,aS as y,b as k,Z as E,B as D,R as n,a9 as l,G as g,S as i}from"./index-orrnp8a1.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-DgYavPcK.js";import"./MediaItemThumb-BFLLxiOJ.js";import"./VChip-DzIcRFdM.js";import"./VBtn-BJolvyKt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-CE2HDv9i.js";import"./VToolbar-BlKUHnwt.js";import"./marquee_text_sync-BWkPRIK0.js";import"./VDialog-oxeMlk6d.js";import"./layout-BTr25AHs.js";import"./ListItem-BOpEb2vA.js";import"./Container-C-MxRHLg.js";import"./VContainer-DvR1uhzJ.js";/* empty css              */import"./VCheckbox-BaanYS4J.js";import"./VCheckboxBtn-CICj8ZxL.js";import"./PanelviewItemCompact-Bf1Qb2IB.js";import"./VSpacer-FMK5QbR9.js";import"./VTextField-DaF8PfrV.js";import"./VInfiniteScroll-CDme3Tib.js";import"./VRow-C4MwkXJh.js";import"./VVirtualScroll-Q9Rc10mA.js";import"./VAlert-BhQ3L7Kc.js";const X=h({__name:"PodcastDetails",props:{itemId:{},provider:{}},setup(d){const t=d,r=p(!1),e=p(),u=async function(){e.value=await a.getPodcast(t.itemId,t.provider)};b(()=>t.itemId,o=>{o&&u()},{immediate:!0}),w(()=>{const o=a.subscribe(y.MEDIA_ITEM_UPDATED,s=>{var m;const f=s.data;((m=e.value)==null?void 0:m.uri)==f.uri&&(r.value=!0)});k(o)});const c=async function(o){return await a.getPodcastEpisodes(t.itemId,t.provider)};return(o,s)=>(i(),E(g,null,[D(v,{item:e.value},null,8,["item"]),e.value?(i(),n(_,{key:0,itemtype:"podcastepisodes","parent-item":e.value,"show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!0,"show-refresh-button":!0,"load-items":c,"sort-keys":["position","position_desc","name","duration","duration_desc"],"update-available":r.value,title:o.$t("podcast_episodes"),"allow-key-hooks":!0,path:`podcast.${t.itemId}.${t.provider}`,"restore-state":!0,"no-server-side-sorting":!0},null,8,["parent-item","update-available","title","path"])):l("",!0),e.value?(i(),n(I,{key:1,"item-details":e.value},null,8,["item-details"])):l("",!0)],64))}});export{X as default};
