import{I as u}from"./ItemsListing-2b5a8c5f.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-74f7ff1e.js";import{d as h,r as _,L as y,c as a,g as I,f as g,e as m,j as n,i as w,b as s,aq as V}from"./index-894ae36a.js";import"./VCheckbox-4fd4d9b8.js";import"./eventbus-f225a5d6.js";import"./VListItem-4174a915.js";import"./VCheckboxBtn-24370bba.js";import"./VList-48dd7d0f.js";import"./VCardText-f53aa54e.js";import"./VCard-3391db98.js";import"./VMenu-6b993280.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-8a38a33e.js";import"./Button-f6514084.js";import"./VSpacer-46dc65f8.js";/* empty css              */import"./PanelviewItemCompact-b99e3c0c.js";import"./VAlert-a768baba.js";import"./Container-0e8820c0.js";import"./Toolbar-43508ce0.js";import"./VToolbar-92b7b4d6.js";import"./VTextField-d7aa64d7.js";import"./VInfiniteScroll-3988a0eb.js";import"./layout-ca8c09ab.js";import"./VVirtualScroll-3adad00e.js";import"./VDialog-0a8de8a6.js";const k=w("br",null,null,-1),X=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(p){const t=p,e=_(),l=async function(){e.value=await s.getRadio(t.itemId,t.provider)};y(()=>t.itemId,i=>{i&&l()},{immediate:!0});const d=async function(i){const o=[];if(t.provider=="library"){const r=await s.getRadioVersions(t.itemId,t.provider);o.push(...r)}for(const r of V(e.value)){const c=await s.getRadioVersions(r.item_id,r.provider_instance);o.push(...c)}return o};return(i,o)=>(a(),I("section",null,[g(f,{item:e.value},null,8,["item"]),e.value?(a(),m(u,{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),k,e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)]))}});export{X as default};
