import{I as f}from"./ItemsListing-Bd2thLHu.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-DHRwPkTM.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-BeguICWm.js";import"./Container-L7ytxuXf.js";import"./index-kQIztB-E.js";import"./Toolbar-DMSWIhz4.js";import"./VToolbar-DZP2Ylkv.js";import"./Button-BjWxTVGU.js";import"./ListItem-DzMz1Zx0.js";import"./userPreferences-CVtQlCYs.js";import"./VCheckboxBtn-HpD-UT_z.js";import"./MediaItemThumb-B7Ks6j0U.js";import"./PanelviewItemCompact-YKRtLaLa.js";import"./VInfiniteScroll-aGYTBb1l.js";import"./VVirtualScroll-Vx_hX6dw.js";import"./VAlert-Dkia6PbV.js";import"./marquee_text_sync-Vcm7FleQ.js";import"./VDialog-3N5CnNiB.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};
