import{I as u}from"./ItemsListing-7bf0c0b0.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-30261e03.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-103db515.js";import{m as V}from"./VCheckbox-ddd5d7c4.js";import"./eventbus-6e1536e2.js";import"./VListItem-ab7a82e2.js";import"./ListItem-91f42136.js";import"./Button-412f73ce.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-482e7fbc.js";import"./VCard-d4f085fd.js";import"./VCardText-1a59cac1.js";import"./VSpacer-adcb10ea.js";/* empty css              */import"./PanelviewItemCompact-5ede3757.js";import"./VAlert-4165d2e6.js";import"./Container-d98651c4.js";import"./Toolbar-908bc969.js";import"./VList-cac73f62.js";import"./VToolbar-dcf67568.js";import"./VTextField-73438668.js";import"./VCheckboxBtn-19bafbc9.js";import"./VInfiniteScroll-c2610a44.js";import"./layout-e7ad5131.js";import"./VVirtualScroll-b23fb9a8.js";import"./VDialog-08f8879f.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};
