import{I as c}from"./ItemsListing-6g08lefW.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CjP5Q_wN.js";import{x as y,r as h,w as I,y as a,D as w,n as V,z as m,K as p,B as g,I as s,ay as k}from"./index-CiFFF7gT.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_4409cede_lang-Z-tWQ5Xz.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-DHkbc-Ta.js";import"./VListItem-De5QDDiQ.js";import"./VChip-BY-Tj5X5.js";import"./VList-ox5PnObc.js";import"./VCardText-DAFrt-9i.js";import"./VCard-OVRwQRVf.js";import"./VMenu-pCNX3_Sk.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-DLjAZgMM.js";import"./VCheckbox-CjvWyEya.js";import"./VCheckboxBtn-BFRXrpB8.js";import"./VTooltip-DXDcYn3_.js";import"./VSpacer-ouclmOAP.js";/* empty css              */import"./PanelviewItemCompact-BLpiE-97.js";import"./Container-cMCd9Qd7.js";import"./VContainer-CuT7UpRw.js";import"./Toolbar-D7ssdDI_.js";import"./VToolbar-Cw0dLkzx.js";import"./VTextField-BPDkDfKc.js";import"./VInfiniteScroll-fVwyx_Ti.js";import"./layout-CZzu_XZd.js";import"./VRow-DJbzO2VZ.js";import"./VVirtualScroll-BganvpON.js";import"./VAlert-DvGaZwBF.js";import"./marquee_text_sync-BmlnKYdI.js";import"./VDialog-dHvRVqSU.js";const te=y({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(n){const t=n,e=h(),l=async function(){e.value=await s.getRadio(t.itemId,t.provider)};I(()=>t.itemId,i=>{i&&l()},{immediate:!0});const d=async function(i){const r=[];if(t.provider=="library"){const o=await s.getRadioVersions(t.itemId,t.provider);r.push(...o)}for(const o of k(e.value)){const u=await s.getRadioVersions(o.item_id,o.provider_instance);r.push(...u)}return r};return(i,r)=>(a(),w("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"])):p("",!0),r[0]||(r[0]=g("br",null,null,-1)),e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)]))}});export{te as default};
