import{I as u}from"./ItemsListing-fd7f4f42.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-961c80c2.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-dce39766.js";import{m as V}from"./VCheckbox-78b5eb27.js";import"./eventbus-e4769370.js";import"./VListItem-e4ea868c.js";import"./ListItem-0ba65b1e.js";import"./Button-222bb89d.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-2f81965b.js";import"./VCard-56599f1a.js";import"./VCardText-499c042a.js";import"./VSpacer-362d86d1.js";/* empty css              */import"./PanelviewItemCompact-1828c58a.js";import"./VAlert-406dcdf2.js";import"./Container-b77335fb.js";import"./Toolbar-0a1c192e.js";import"./VList-04768c49.js";import"./VToolbar-2cbe0a6f.js";import"./VTextField-57d20f88.js";import"./VCheckboxBtn-ee4d01ee.js";import"./VInfiniteScroll-57f099b2.js";import"./layout-9d53f89f.js";import"./VVirtualScroll-0a365e7c.js";import"./VDialog-1b168444.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};
