import{I as u}from"./ItemsListing-11e57922.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-59cbe76c.js";import{d as h,r as _,N as y,c as a,g as I,f as g,e as m,j as n,i as w,b as s}from"./index-8f5a1103.js";import{m as V}from"./VCheckbox-550c9d56.js";import"./eventbus-4414c78d.js";import"./VListItem-f276ce89.js";import"./ListItem-8545443d.js";import"./Button-ba388d7c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-460aeee2.js";import"./VCard-f870619c.js";import"./VCardText-b6df0880.js";import"./VSpacer-7e1c7cc6.js";/* empty css              */import"./PanelviewItemCompact-9dbf23c8.js";import"./VAlert-5e7d05d1.js";import"./Container-d0f24e78.js";import"./Toolbar-05d709df.js";import"./VList-7fe4933f.js";import"./VToolbar-48fe5e59.js";import"./VTextField-12e47ab6.js";import"./VCheckboxBtn-ce7a5f08.js";import"./VInfiniteScroll-932afb4c.js";import"./layout-4f782805.js";import"./VVirtualScroll-6933a69f.js";import"./VDialog-1a146eb3.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};
