import{I as n}from"./ItemsListing-eA5h6-XH.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-EinyuXb_.js";import{Q as y,x as k,w,Z as b,B as h,R as l,a9 as s,W as m,a0 as I,a4 as o,S as i}from"./index-B1-NcwUi.js";import"./MediaItemThumb-BtIHEboo.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-CSrzXWJm.js";import"./VChip-DM7RmZPX.js";import"./VBtn-bKB7410c.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-6jrqendR.js";import"./VCheckbox-CSiN6FWn.js";import"./VCheckboxBtn-D0e0hPpb.js";import"./PanelviewItemCompact-DE5fLYzA.js";import"./VSpacer-BnqzrVSe.js";/* empty css              */import"./Container-DM1rL0ee.js";import"./VContainer-CUL0yimr.js";import"./Toolbar-CT5KA9Gu.js";import"./VToolbar-ZYKrVnx8.js";import"./VTextField-Cco-YJDX.js";import"./VInfiniteScroll-DmFIOmEc.js";import"./layout-CWXF8_1y.js";import"./VRow-B-PRAJh8.js";import"./VVirtualScroll-D-wPh9N4.js";import"./VAlert-amXXO5IX.js";import"./marquee_text_sync-D_jA69-S.js";import"./VDialog-xuoLnnyG.js";const K=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(p){const t=p,r=k(),u=async function(){r.value=await o.getTrack(t.itemId,t.provider,t.album)};w(()=>t.itemId,e=>{e&&u()},{immediate:!0});const d=async function(e){return await o.getTrackVersions(r.value.item_id,r.value.provider)},v=async function(e){return await o.getTrackAlbums(t.itemId,t.provider,e.libraryOnly)};return(e,a)=>(i(),b("section",null,[h(f,{item:r.value,"active-provider":e.provider},null,8,["item","active-provider"]),r.value?(i(),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(o).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?(i(),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?(i(),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};
