import{I as n}from"./ItemsListing-DWzn5l67.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CgqIxdYx.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-DdI--Yet.js";import"./MediaItemThumb-DHcqTVjl.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-D41gG9IS.js";import"./VChip-BBcriFso.js";import"./VBtn-g6NhQ7fK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-BK1DMsnV.js";import"./VCheckbox-B4YfxJ0R.js";import"./VCheckboxBtn-BWCQ3DqN.js";import"./PanelviewItemCompact-kTIN1Q1A.js";import"./VSpacer-DDLLNEUh.js";/* empty css              */import"./Container-B4zACZDu.js";import"./VContainer-BtdP8B7E.js";import"./Toolbar-BGUFqu6B.js";import"./VToolbar-DRvSLcNG.js";import"./VTextField-CkYsZnxG.js";import"./VInfiniteScroll-B6R5NfAO.js";import"./layout-CiO1VcK1.js";import"./VRow-VEN0m6ZM.js";import"./VVirtualScroll-D10a-qpl.js";import"./VAlert-CIZAmx66.js";import"./marquee_text_sync-BWVVy3ud.js";import"./VDialog-Babb4d0Q.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};
