import{I as p}from"./ItemsListing-DTH9nBqi.js";import{I as c,_ as f}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CNd2Ys0f.js";import{d as y,r as k,ae as b,c as h,b as w,h as s,e as m,a as n,u as I,v as o,o as l}from"./index-CoB_2BUd.js";import"./Container-BzMt4Ci6.js";import"./index-kQIztB-E.js";import"./VContainer-DlTgmJKi.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-B0keKpNj.js";import"./VToolbar-CJXC56GW.js";import"./VBtn-hyLqVrgl.js";import"./Button-BDPKHRLH.js";import"./ListItem-DQin6AeB.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-rRluqShO.js";import"./VInput-BoZgh6ys.js";import"./MediaItemThumb-BKmjY3cv.js";import"./PanelviewItemCompact-B9m_eVXB.js";import"./VSpacer-C76jgahG.js";import"./VTextField-DbD7hU_y.js";import"./VInfiniteScroll--D1O9T4-.js";import"./layout-CPyFIpzx.js";import"./VRow-CLgWC1Pi.js";import"./VVirtualScroll-CSh2i2e_.js";import"./VAlert-C67nJg0B.js";import"./marquee_text_sync-IliXMDRi.js";import"./VDialog-ByOT2kqj.js";const U=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(r){const a=r,e=k(),u=async function(){e.value=await o.getTrack(a.itemId,a.provider,a.album)};b(()=>a.itemId,t=>{t&&u()},{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(),h("section",null,[w(c,{item:e.value,"active-provider":r.provider},null,8,["item","active-provider"]),e.value?(l(),s(p,{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(p,{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{U as default};
