import{I as u}from"./ItemsListing-496384e5.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-54af6448.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-bf0eaf20.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_d4387993_lang-b7e5044b.js";import"./eventbus-b340f869.js";import"./VListItem-223b492d.js";import"./VLabel-e07a3413.js";import"./VList-21e2a257.js";import"./VCardText-8a9fa9c7.js";import"./VCard-97256dbd.js";import"./VMenu-71b97cab.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-b1725b5d.js";import"./Button-574f04d4.js";import"./PanelviewItemCompact-cb3303f4.js";import"./VCheckboxBtn-f3296201.js";import"./VSpacer-36b6f8a9.js";/* empty css              */import"./VAlert-e2b3a5a6.js";import"./Container-88f21350.js";import"./Toolbar-1985c49b.js";import"./VToolbar-219721ba.js";import"./VTextField-ad1ef579.js";import"./VVirtualScroll-837eb7b9.js";import"./VInfiniteScroll-71aa3856.js";import"./layout-8db27034.js";import"./VDialog-18e61467.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};
