import{I as v}from"./ItemsListing-w00UZyUV.js";import{I as y,_ as k}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CO2s0dkN.js";import{Q as I,x as m,w as _,o as h,a4 as r,aU as b,b as w,Z as D,B as g,R as p,a9 as n,G as B,S as i}from"./index-DHdZ3kUo.js";import"./MediaItemThumb-BgnQJnC4.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-D82xkCoP.js";import"./Button-Dgn90_wu.js";import"./VBtn-DqyIv1Wk.js";import"./VCheckbox-eVQCWG3M.js";import"./VCheckboxBtn-DLxQu9yw.js";import"./PanelviewItemCompact-776c11Dw.js";import"./VSpacer-BkXa9hHi.js";/* empty css              */import"./Container-Df6fHx0a.js";import"./VContainer-BPmvVR0-.js";import"./Toolbar-D2EfoAlR.js";import"./VToolbar-DgW7y8TG.js";import"./VTextField-ClaYK-kH.js";import"./VInfiniteScroll-B0eycroE.js";import"./layout-CyoFEFNl.js";import"./VRow-CwPnZM2-.js";import"./VVirtualScroll-HiNSn0b7.js";import"./VAlert-D2DA3ZFe.js";import"./marquee_text_sync-CWCQ9aST.js";import"./VDialog-DrY7Fpem.js";const W=I({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(u){const t=u,o=m(!1),e=m(),d=async function(){e.value=await r.getPlaylist(t.itemId,t.provider)};_(()=>t.itemId,a=>{a&&d()},{immediate:!0}),h(()=>{const a=r.subscribe(b.MEDIA_ITEM_UPDATED,s=>{var l;const f=s.data;((l=e.value)==null?void 0:l.uri)==f.uri&&(o.value=!0)});w(a)});const c=async function(a){return await r.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,s)=>(i(),D(B,null,[g(y,{item:e.value},null,8,["item"]),e.value?(i(),p(v,{key:0,itemtype:"playlisttracks","parent-item":e.value,"show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!1,"show-refresh-button":!0,"load-items":c,"sort-keys":["position","position_desc","name","artist","album","duration","duration_desc"],"update-available":o.value,title:a.$t("playlist_tracks"),"allow-key-hooks":!0,path:`playlist.${t.itemId}.${t.provider}`,"restore-state":!0,"no-server-side-sorting":!0},null,8,["parent-item","update-available","title","path"])):n("",!0),e.value?(i(),p(k,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)],64))}});export{W as default};
