import{I as f}from"./ItemsListing-D6AMqIYc.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-ClXR5oFa.js";import{c as r,E as I}from"./index-CxiRlsCY.js";import{d as k,r as m,w as _,o as h,a0 as b,b as w,e as i,H as D,D as p,I as n,F as E}from"./lucide-C2DU1LFb.js";import"./Container-CwfZ2VgM.js";import"./index-kQIztB-E.js";import"./vuetify-RelkxOq-.js";import"./utils-CDN07tui.js";import"./Toolbar-MwYpbj3t.js";import"./userPreferences-ln7cf3P6.js";import"./vue-router-BgJK_hRC.js";import"./Button-DBt8j7D4.js";import"./ListItem-DzUpG5Dm.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-D7lqdhVg.js";import"./MediaItemThumb-C7OhU3lK.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C17dV9_V.js";import"./vue-i18n-DySrp6mW.js";import"./PanelviewItemCompact-Cjl_ij1h.js";import"./marquee_text_sync-BtOjTSaq.js";import"./qrcode-DSFhiIp2.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-DIaEWNCo.js";/* empty css            */import"./swiper-Jy9GbtzK.js";const W=k({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(u){const e=u,o=m(!1),t=m(),d=async function(){t.value=await r.getPlaylist(e.itemId,e.provider)};_(()=>e.itemId,a=>{a&&d()},{immediate:!0}),h(()=>{const a=r.subscribe(I.MEDIA_ITEM_UPDATED,s=>{const l=s.data;t.value?.uri==l.uri&&(t.value=l,o.value=!0)});b(a)});const c=async function(a){return await r.getPlaylistTracks(e.itemId,e.provider,a.refresh)};return(a,s)=>(i(),w(E,null,[D(v,{item:t.value},null,8,["item"]),t.value?(i(),p(f,{key:0,itemtype:"playlisttracks","parent-item":t.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.${e.itemId}.${e.provider}`,"restore-state":!0,"no-server-side-sorting":!0},null,8,["parent-item","update-available","title","path"])):n("",!0),t.value?(i(),p(y,{key:1,"item-details":t.value},null,8,["item-details"])):n("",!0)],64))}});export{W as default};
