import{I as f}from"./ItemsListing-DdSUpMhP.js";import{I as v}from"./InfoHeader-CoNYNcZm.js";import{_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-CXtwfgiQ.js";import{a as r,E as h}from"./index-CKxLfxpS.js";import{d as k,w as I,o as _,r as m,a3 as b,b as w,J as D,G as p,K as n,F as E,e as i}from"./lucide-UY9XeFdQ.js";import"./Container-B1UOd5ED.js";import"./index-kQIztB-E.js";import"./vuetify-C0IIhwYL.js";import"./Toolbar-Da01lZeW.js";import"./userPreferences-BgjK7xB_.js";import"./vue-router-DNlH4vva.js";import"./Button-DdCpYaoc.js";import"./ListItem-BP0lui-9.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CnaMVQug.js";import"./MediaItemThumb-DiY2t3Gt.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-DYXAnx83.js";import"./vue-i18n-DwYfJ_fn.js";import"./PanelviewItemCompact-BhrDAsYI.js";import"./marquee_text_sync-C4anEqYx.js";import"./MarqueeText-DvK0-Oq1.js";import"./color-CcshWhNz.js";import"./qrcode-CJNXjF_3.js";import"./marked-D9eDbhZJ.js";import"./vueuse-Dj-fx4H6.js";/* empty css            */import"./swiper-DNx4mJDO.js";const X=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)};I(()=>e.itemId,a=>{a&&d()},{immediate:!0}),_(()=>{const a=r.subscribe(h.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{X as default};
