import{I as u}from"./ItemsListing-6VW59A0B.js";import{I as c,_ as f}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CXwX75cg.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-C-Ivu3jU.js";import"./Container-DVyc_Yt_.js";import"./index-kQIztB-E.js";import"./VContainer-CNNJtZg6.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-CLPRlZ-4.js";import"./VToolbar-DTucOBiF.js";import"./Button-FtStaD9_.js";import"./ListItem-BLmrgznL.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B5IzKSW4.js";import"./VCheckboxBtn-BmKOjEU4.js";import"./VInput-CnrZS6Kh.js";import"./MediaItemThumb-BsXB7IV6.js";import"./PanelviewItemCompact-5_ppRL3T.js";import"./VTextField-Bkx949P5.js";import"./VSnackbar-C_PtJN1U.js";import"./layout-D2NB7OTD.js";import"./VRow-DOG0WeJD.js";import"./VVirtualScroll-C_Lzj3jv.js";import"./VAlert-B3qbTkCR.js";import"./marquee_text_sync-DUGxi-pZ.js";import"./VDialog-BZuFHdVP.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};
