import{I as c}from"./ItemsListing-Cnfrbqt8.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_style_index_0_lang-B173j0nZ.js";import{az as h,J as y,L as I,aP as w,aG as s,o as V,aF as m,aK as l,E as g,bc as n,co as k}from"./index-D2rF_80D.js";import"./Container-C7yRkeCv.js";import"./index-kQIztB-E.js";import"./Toolbar-C66D0zTJ.js";import"./VToolbar-Db4qfa2C.js";import"./Button-CrfR8Gdt.js";import"./ListItem-CU9QYmiw.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cf4_7ViH.js";import"./MediaItemThumb-A-03axGx.js";import"./VCheckbox-DccbdgFZ.js";import"./VCheckboxBtn-Dik76WyM.js";import"./VSelectionControl-BHjDOTFl.js";import"./PanelviewItemCompact-BWonx8dk.js";import"./userPreferences-DWdlmlmR.js";import"./VInfiniteScroll-CfzetGUD.js";import"./VVirtualScroll-CG155sfU.js";import"./marquee_text_sync-Bj0t3siK.js";const S=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(a){const t=a,e=y(),p=async function(){e.value=await n.getRadio(t.itemId,t.provider)};I(()=>t.itemId,o=>{o&&p()},{immediate:!0});const d=async function(o){const i=[];if(t.provider=="library"){const r=await n.getRadioVersions(t.itemId,t.provider);i.push(...r)}for(const r of k(e.value)){const u=await n.getRadioVersions(r.item_id,r.provider_instance);i.push(...u)}return i};return(o,i)=>(s(),w("section",null,[V(f,{item:e.value},null,8,["item"]),e.value?(s(),m(c,{key:0,itemtype:"radioversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library":!1,"show-radio-number":!1,"show-duration":!1,"load-items":d,"sort-keys":["provider","sort_name"],title:o.$t("other_versions"),"hide-on-empty":!0,checksum:a.provider+a.itemId},null,8,["parent-item","title","checksum"])):l("",!0),i[0]||(i[0]=g("br",null,null,-1)),e.value?(s(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):l("",!0)]))}});export{S as default};
