import{I as f}from"./ItemsListing-C9zw7KHa.js";import{I as v}from"./InfoHeader-DqYgBQTK.js";import{_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-8iKR5c6U.js";import{f as r,E as I}from"./index-CyXUjyDM.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-BsOfcLnq.js";import"./Container-D40_MO5w.js";import"./index-kQIztB-E.js";import"./vuetify-DHCm6MV9.js";import"./Toolbar-CTiACIvy.js";import"./userPreferences-CnLqlkxN.js";import"./vue-router-hLkI791z.js";import"./Button-DbnN1LyR.js";import"./ListItem-_zvhSn9K.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cya6xPO3.js";import"./MediaItemThumb-BvqlnbT6.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-CsLTxntn.js";import"./vue-i18n-CXdnqGsF.js";import"./PanelviewItemCompact-Dlf-jeIa.js";import"./marquee_text_sync-DS7II3sd.js";import"./qrcode-DcFvg0BH.js";import"./marked-i_gIkIP3.js";import"./color-BTziYnFN.js";import"./vueuse-CmMrRm2c.js";/* empty css            */import"./swiper-BIRaDS2w.js";const W=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{W as default};
