import{I as f}from"./ItemsListing-eVdafYr6.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-QgyTRm80.js";import{c as r,E as I}from"./index-Df2MtF-k.js";import{d as k,r as l,w as _,o as h,a2 as b,b as w,e as i,H as D,D as m,I as p,F as E}from"./lucide-PBDL9g_H.js";import"./Container-BIrizOVu.js";import"./index-kQIztB-E.js";import"./vuetify-D_QaYjDz.js";import"./Toolbar-C9FGE9Cx.js";import"./vue-router-BTykswgC.js";import"./Button-BIXkLIBy.js";import"./ListItem-CvIa-5A0.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DELv5odx.js";import"./MediaItemThumb-BC5MycuJ.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BEhybLFg.js";import"./vue-i18n-CYwaof5n.js";import"./PanelviewItemCompact-C3B2OPOu.js";import"./userPreferences-BS-h7Wmh.js";import"./marquee_text_sync-A-O4YTPx.js";import"./qrcode-CCr-KruI.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-w9cS6Vug.js";/* empty css            */import"./swiper-BLmWk8fI.js";const S=k({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(n){const t=n,o=l(!1),e=l(),u=async function(){e.value=await r.getPlaylist(t.itemId,t.provider)};_(()=>t.itemId,a=>{a&&u()},{immediate:!0}),h(()=>{const a=r.subscribe(I.MEDIA_ITEM_UPDATED,s=>{const c=s.data;e.value?.uri==c.uri&&(o.value=!0)});b(a)});const d=async function(a){return await r.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,s)=>(i(),w(E,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":d,"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"])):p("",!0),e.value?(i(),m(y,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)],64))}});export{S as default};
