import{I as c}from"./ItemsListing-DWt-TOzI.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-DK0OvcPJ.js";import{Q as h,x as y,w,Z as I,B as V,R as m,a9 as n,W as g,S as a,a4 as s,by as k}from"./index-CW9q7Ug9.js";import"./MediaItemThumb-CL9fz0xp.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-7Usxgk-m.js";import"./VBtn-BG_l-jMN.js";import"./VCheckbox-iOyX9dtq.js";import"./VCheckboxBtn-VcTG8xE4.js";import"./PanelviewItemCompact-DWTozcIF.js";import"./VSpacer-Cfs--T9C.js";/* empty css              */import"./Container-EEkubRcn.js";import"./VContainer-DzQ369Qf.js";import"./Toolbar-C4zmMwWE.js";import"./VToolbar-C3R4TUTJ.js";import"./VTextField-Dh0rJNQB.js";import"./VInfiniteScroll-rtn8HdwT.js";import"./layout-BUE-Vdg2.js";import"./VRow-DLxHB18w.js";import"./VVirtualScroll-BDWbQaCz.js";import"./VAlert-QmZazhWy.js";import"./marquee_text_sync-B5G6DNi6.js";import"./VDialog-hpeVNzwd.js";const J=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(p){const t=p,e=y(),l=async function(){e.value=await s.getRadio(t.itemId,t.provider)};w(()=>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 k(e.value)){const u=await s.getRadioVersions(r.item_id,r.provider_instance);o.push(...u)}return o};return(i,o)=>(a(),I("section",null,[V(f,{item:e.value},null,8,["item"]),e.value?(a(),m(c,{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),o[0]||(o[0]=g("br",null,null,-1)),e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)]))}});export{J as default};
