import{I as c}from"./ItemsListing-BLy3orFl.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-MSrzTRTt.js";import{d as h,r as y,K as I,c as a,h as g,f as w,e as m,j as n,g as V,b as s,at as k}from"./index-Zc-wk74_.js";import"./VCheckbox-D5GHrdOX.js";import"./eventbus-C0P6qNPg.js";import"./VListItem-CCUcPpLz.js";import"./VCheckboxBtn-Ct-7Y74e.js";import"./VList-Dusd_5Ye.js";import"./VCardText-hY73Mfke.js";import"./VCard-C45UgMrt.js";import"./VMenu-DClF7_xn.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-UibH6rGC.js";import"./Button-D7IzaK38.js";import"./VSpacer-CkJvldNK.js";/* empty css              */import"./PanelviewItemCompact-B7b1ByGO.js";import"./VAlert-vUskc6_6.js";import"./Container-DGS7HYh8.js";import"./Toolbar-vaceze9C.js";import"./VToolbar-Dq9qTrL6.js";import"./VTextField-CBev3KF6.js";import"./VInfiniteScroll-Cg0KRQkn.js";import"./layout-7-Oykuky.js";import"./VVirtualScroll-Dejhj8p2.js";import"./VDialog-CbuJtwYV.js";const W=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(p){const t=p,e=y(),l=async function(){e.value=await s.getRadio(t.itemId,t.provider)};I(()=>t.itemId,i=>{i&&l()},{immediate:!0});const d=async function(i){const r=[];if(t.provider=="library"){const o=await s.getRadioVersions(t.itemId,t.provider);r.push(...o)}for(const o of k(e.value)){const u=await s.getRadioVersions(o.item_id,o.provider_instance);r.push(...u)}return r};return(i,r)=>(a(),g("section",null,[w(f,{item:e.value},null,8,["item"]),e.value?(a(),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:i.$t("other_versions"),"hide-on-empty":!0,checksum:i.provider+i.itemId},null,8,["parent-item","title","checksum"])):n("",!0),r[0]||(r[0]=V("br",null,null,-1)),e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)]))}});export{W as default};
