import{I as u}from"./ItemsListing-ffc2935e.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-f8349cea.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-8e7daee8.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_d4387993_lang-755a1a8b.js";import"./eventbus-d39a7847.js";import"./VListItem-09460541.js";import"./VLabel-46f0710d.js";import"./VList-ca6176f0.js";import"./VCard-990eebd4.js";import"./VCardText-a5e6d4d4.js";import"./VMenu-64e96597.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-b626b3fa.js";import"./Button-caab2d1b.js";import"./PanelviewItemCompact-2d9663c1.js";import"./VCheckboxBtn-1b20bfe7.js";import"./VSpacer-28a82c5a.js";/* empty css              */import"./VAlert-fd6ed822.js";import"./Container-0d470ed8.js";import"./Toolbar-e48261c7.js";import"./VToolbar-645a3ba3.js";import"./VTextField-12379bad.js";import"./VVirtualScroll-01e39aac.js";import"./VInfiniteScroll-40f31e12.js";import"./layout-a17f5af6.js";import"./VDialog-1c9bf8d5.js";const k=w("br",null,null,-1),Y=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{Y as default};
