import{I as f}from"./ItemsListing-Dd2XfzXe.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-IDW8d92N.js";import{c as r,E as I}from"./index-HFEfURXv.js";import{d as k,r as l,w as _,o as h,a1 as b,b as w,e as i,H as D,D as m,I as n,F as E}from"./lucide-sS6c3snl.js";import"./Container-LvH0QRIT.js";import"./index-kQIztB-E.js";import"./vuetify-ffr1lJCG.js";import"./Toolbar-BVGuuXVD.js";import"./vue-router-CDtPtBGv.js";import"./Button-Dcdmvtuy.js";import"./ListItem-C-8fkaRP.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Bgx2hOXi.js";import"./MediaItemThumb-D4l-2_B4.js";import"./vue-i18n-h4EBIvPF.js";import"./PanelviewItemCompact-PrcYkefq.js";import"./userPreferences-CRnDt302.js";import"./marquee_text_sync-BgCfvceK.js";import"./qrcode-Dq-byqKu.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-B-HgI0gk.js";/* empty css            */import"./swiper-BtP4dEja.js";const R=k({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(p){const t=p,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"])):n("",!0),e.value?(i(),m(y,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)],64))}});export{R as default};
