import{I as f}from"./ItemsListing-BT5bkjnD.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-DjL90_ri.js";import{f as r,E as I}from"./index-CiUjb5WK.js";import{d as h,w as k,o as _,r as m,a0 as b,b as w,H as D,D as p,I as n,F as E,e as i}from"./lucide-CoF0tLOi.js";import"./Container-7m3numUl.js";import"./index-kQIztB-E.js";import"./vuetify-COE8TWsB.js";import"./Toolbar-D5VX6ntl.js";import"./userPreferences-Bu9ylb3m.js";import"./vue-router-BnXzVtNF.js";import"./Button-pzGpXyJ6.js";import"./ListItem-DvOGstz8.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-ZhN3thdv.js";import"./MediaItemThumb-Ck1-l2t-.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-DM3kg31t.js";import"./vue-i18n-Byo65gUq.js";import"./PanelviewItemCompact-DML3A1tu.js";import"./marquee_text_sync-C-KJfGD_.js";import"./qrcode-BbZu2DL4.js";import"./marked-D2lEcfQr.js";import"./color-BTziYnFN.js";import"./vueuse-uADb4LNz.js";/* empty css            */import"./swiper-BhCEH9PO.js";const S=h({__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)};k(()=>e.itemId,a=>{a&&d()},{immediate:!0}),_(()=>{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,"refresh-on-parent-update":!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{S as default};
