import{I as v,_ as I}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CgqIxdYx.js";import{I as _}from"./ItemsListing-DWzn5l67.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-DdI--Yet.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-D41gG9IS.js";import"./MediaItemThumb-DHcqTVjl.js";import"./VChip-BBcriFso.js";import"./VBtn-g6NhQ7fK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-BGUFqu6B.js";import"./VToolbar-DRvSLcNG.js";import"./marquee_text_sync-BWVVy3ud.js";import"./VDialog-Babb4d0Q.js";import"./layout-CiO1VcK1.js";import"./ListItem-BK1DMsnV.js";import"./Container-B4zACZDu.js";import"./VContainer-BtdP8B7E.js";/* empty css              */import"./VCheckbox-B4YfxJ0R.js";import"./VCheckboxBtn-BWCQ3DqN.js";import"./PanelviewItemCompact-kTIN1Q1A.js";import"./VSpacer-DDLLNEUh.js";import"./VTextField-CkYsZnxG.js";import"./VInfiniteScroll-B6R5NfAO.js";import"./VRow-VEN0m6ZM.js";import"./VVirtualScroll-D10a-qpl.js";import"./VAlert-CIZAmx66.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};
