import{I as n}from"./ItemsListing-t4zttHcu.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-DKVZaoMX.js";import{U as y,x as k,w as b,a0 as w,X as o,F as h,W as l,ab as s,E as m,a2 as I,a6 as i}from"./index-B-lUZalq.js";import"./Container-Br6JH6Pm.js";import"./Button-kSJGA_Pw.js";import"./VBtn-BPJ1JKW-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-DB65WVbe.js";/* empty css              */import"./Toolbar-BvxWbi_E.js";import"./VToolbar-RljK0PC9.js";import"./ListItem-LV_WU--g.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DnroVGI-.js";import"./VInput-BWBQqjuk.js";import"./MediaItemThumb-DapaMoP4.js";import"./PanelviewItemCompact-CIDxIfoQ.js";import"./VSpacer-DDLrofv-.js";import"./VTextField-B-d5Pe9I.js";import"./VInfiniteScroll-CKZj-VKd.js";import"./layout-BuzUTwrQ.js";import"./VRow-BQOTE9C_.js";import"./VVirtualScroll-CceW16X7.js";import"./VAlert-QHTIcuEJ.js";import"./marquee_text_sync-D7pvlIaW.js";import"./VDialog-CAgq0L03.js";const K=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(p){const t=p,r=k(),u=async function(){r.value=await i.getTrack(t.itemId,t.provider,t.album)};b(()=>t.itemId,e=>{e&&u()},{immediate:!0});const d=async function(e){return await i.getTrackVersions(r.value.item_id,r.value.provider)},v=async function(e){return await i.getTrackAlbums(t.itemId,t.provider,e.libraryOnly)};return(e,a)=>(o(),w("section",null,[h(f,{item:r.value,"active-provider":e.provider},null,8,["item","active-provider"]),r.value?(o(),l(n,{key:0,itemtype:"trackalbums","parent-item":r.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":r.value.provider=="library"&&I(i).hasStreamingProviders.value,"show-track-number":!1,"show-refresh-button":!1,"load-items":v,"sort-keys":["name","sort_name","year","year_desc"],title:e.$t("appears_on"),path:e.provider+e.itemId,"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title","path"])):s("",!0),a[0]||(a[0]=m("br",null,null,-1)),r.value?(o(),l(n,{key:1,itemtype:"trackversions","parent-item":r.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-track-number":!1,"load-items":d,"show-refresh-button":!1,"sort-keys":["name","sort_name","duration"],title:e.$t("other_versions"),"hide-on-empty":!0,path:e.provider+e.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):s("",!0),a[1]||(a[1]=m("br",null,null,-1)),r.value?(o(),l(c,{key:2,"item-details":r.value},null,8,["item-details"])):s("",!0),a[2]||(a[2]=m("br",null,null,-1))]))}});export{K as default};
