import{I as f}from"./ItemsListing-COLlw5bq.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-1QTHf_I3.js";import{aw as k,J as l,L as I,a3 as _,aN as r,b9 as h,a4 as b,ax as w,ay as i,o as g,aG as m,az as n,ag as D}from"./index-DhxwW1_d.js";import"./Container-D2fLqW0L.js";import"./index-kQIztB-E.js";import"./Toolbar-BfQbzcpc.js";import"./VToolbar-69Rn7taX.js";import"./Button-Dq6btUmD.js";import"./ListItem-DYjdeEgj.js";import"./userPreferences-Dy9_V1Qk.js";import"./VCheckboxBtn-DVNTnMLw.js";import"./MediaItemThumb-CBiFFPUA.js";import"./PanelviewItemCompact-KbS5CIFi.js";import"./VInfiniteScroll-Ce2Gi50Y.js";import"./VVirtualScroll-DTRxXskS.js";import"./VAlert-D-KKGAlc.js";import"./marquee_text_sync-BLGanaiv.js";import"./VDialog-CSHdlt_o.js";const j=k({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(p){const t=p,s=l(!1),e=l(),u=async function(){e.value=await r.getPlaylist(t.itemId,t.provider)};I(()=>t.itemId,a=>{a&&u()},{immediate:!0}),_(()=>{const a=r.subscribe(h.MEDIA_ITEM_UPDATED,o=>{const c=o.data;e.value?.uri==c.uri&&(s.value=!0)});b(a)});const d=async function(a){return await r.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,o)=>(i(),w(D,null,[g(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":d,"sort-keys":["position","position_desc","name","artist","album","duration","duration_desc"],"update-available":s.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{j as default};
