import{I as u}from"./ItemsListing-C49HRbSG.js";import{I as c,_ as f}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-BrpUE5JN.js";import{av as y,H as k,J as w,aw as b,x as h,aD as s,ay as m,d as n,az as I,aL as o,ax as l}from"./index-9wFVyQJF.js";import"./Container-BJrCSObY.js";import"./index-kQIztB-E.js";import"./VContainer-Bmll2nQh.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-DKtKPcsg.js";import"./VToolbar-BKGXqxdt.js";import"./Button-C-VEz_LI.js";import"./ListItem-UwdbG-Br.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-BsGozMKb.js";import"./VCheckboxBtn-DtwUx7x8.js";import"./VInput-Bym6CXFb.js";import"./MediaItemThumb-CIzEvLC1.js";import"./PanelviewItemCompact-Bh2HNG1g.js";import"./VTextField-DJZc05eK.js";import"./VSnackbar-B7zT2MUe.js";import"./layout-BdbtgIRG.js";import"./VRow-plcqQvnb.js";import"./VVirtualScroll-H5Wikvf-.js";import"./VAlert-D47QZ7qK.js";import"./marquee_text_sync-D3Qu1KPM.js";import"./VDialog-BPGCUfED.js";const Q=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(r){const a=r,e=k(),p=async function(){e.value=await o.getTrack(a.itemId,a.provider,a.album)};w(()=>a.itemId,t=>{t&&p()},{immediate:!0});const d=async function(t){return await o.getTrackVersions(e.value.item_id,e.value.provider)},v=async function(t){return await o.getTrackAlbums(a.itemId,a.provider,t.libraryOnly)};return(t,i)=>(l(),b("section",null,[h(c,{item:e.value,"active-provider":r.provider},null,8,["item","active-provider"]),e.value?(l(),s(u,{key:0,itemtype:"trackalbums","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":e.value.provider=="library"&&I(o).hasStreamingProviders.value,"show-track-number":!1,"show-refresh-button":!1,"load-items":v,"sort-keys":["name","sort_name","year","year_desc"],title:t.$t("appears_on"),path:r.provider+r.itemId,"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title","path"])):m("",!0),i[0]||(i[0]=n("br",null,null,-1)),e.value?(l(),s(u,{key:1,itemtype:"trackversions","parent-item":e.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:t.$t("other_versions"),"hide-on-empty":!0,path:r.provider+r.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):m("",!0),i[1]||(i[1]=n("br",null,null,-1)),e.value?(l(),s(f,{key:2,"item-details":e.value},null,8,["item-details"])):m("",!0),i[2]||(i[2]=n("br",null,null,-1))]))}});export{Q as default};
