import{I as c}from"./ItemsListing-Bq7dQOiw.js";import{I as f}from"./InfoHeader-3c46ysj1.js";import{f as a,E as v,G as I}from"./index-DkCrJWiT.js";import{_ as h}from"./ProviderDetails.vue_vue_type_style_index_0_lang-CddUl0Gg.js";import{d as y,w,o as V,r as b,a0 as g,b as k,H as _,D as n,I as p,f as D,e as m}from"./lucide-CCrbsyJI.js";import"./Container-ht6g3SFE.js";import"./index-kQIztB-E.js";import"./vuetify-DEtiqX2e.js";import"./Toolbar-Cm8ayNM7.js";import"./userPreferences-CvP8TO0n.js";import"./vue-router-D-D-f2lE.js";import"./Button-C0-5VNWx.js";import"./ListItem-DbXLF-gF.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-ZEWdOjMC.js";import"./MediaItemThumb-BOlp6GIr.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-hy1bGinH.js";import"./vue-i18n-krBRuO6q.js";import"./PanelviewItemCompact-CXjnVwrs.js";import"./marquee_text_sync-CYFWBA-S.js";import"./color-CcshWhNz.js";import"./qrcode-CCHMWIXh.js";import"./marked-i_gIkIP3.js";import"./vueuse-FEBxOGD_.js";/* empty css            */import"./swiper-YiD1SI-4.js";const X=y({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(s){const i=s,e=b(),l=async function(){e.value=await a.getRadio(i.itemId,i.provider)};w(()=>i.itemId,r=>{r&&l()},{immediate:!0}),V(()=>{const r=a.subscribe(v.MEDIA_ITEM_UPDATED,t=>{const o=t.data;e.value?.uri==o.uri&&(e.value=o)});g(r)});const d=async function(r){const t=[];if(i.provider=="library"){const o=await a.getRadioVersions(i.itemId,i.provider);t.push(...o)}for(const o of I(e.value)){const u=await a.getRadioVersions(o.item_id,o.provider_instance);t.push(...u)}return t};return(r,t)=>(m(),k("section",null,[_(f,{item:e.value},null,8,["item"]),e.value?(m(),n(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:r.$t("other_versions"),"hide-on-empty":!0,checksum:s.provider+s.itemId},null,8,["parent-item","title","checksum"])):p("",!0),t[0]||(t[0]=D("br",null,null,-1)),e.value?(m(),n(h,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)]))}});export{X as default};
