import{I as f}from"./ItemsListing-p3UDrkaz.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-CPJnCCao.js";import{ay as I,J as l,L as h,a3 as k,aP as r,bc as _,a4 as b,az as w,aA as i,o as D,aI as m,aB as n,ah as P}from"./index-D-FY8Yx2.js";import"./Container-C7DumkgJ.js";import"./index-kQIztB-E.js";import"./Toolbar-CxAnowGj.js";import"./VToolbar-BGzu4h11.js";import"./Button-B57MCuAc.js";import"./ListItem-CX5q61ih.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B1j6uBGW.js";import"./MediaItemThumb-CzEoSAF3.js";import"./VCheckbox-W6o6QHjE.js";import"./VCheckboxBtn-DpMGI-si.js";import"./VSelectionControl-CyrHFsUF.js";import"./PanelviewItemCompact-BY3CNldl.js";import"./userPreferences-7uBq50Yx.js";import"./VInfiniteScroll-CRxNfWga.js";import"./VVirtualScroll-cGuYysLa.js";import"./marquee_text_sync-OdthARHF.js";const G=I({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(p){const t=p,o=l(!1),e=l(),u=async function(){e.value=await r.getPlaylist(t.itemId,t.provider)};h(()=>t.itemId,a=>{a&&u()},{immediate:!0}),k(()=>{const a=r.subscribe(_.MEDIA_ITEM_UPDATED,s=>{const d=s.data;e.value?.uri==d.uri&&(o.value=!0)});b(a)});const c=async function(a){return await r.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,s)=>(i(),w(P,null,[D(v,{item:e.value},null,8,["item"]),e.value?(i(),m(f,{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(),m(y,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)],64))}});export{G as default};
