import{I as f}from"./ItemsListing-CVwEjiOr.js";import{I as v}from"./InfoHeader-BVLnVgWk.js";import{_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-CVMsU16L.js";import{f as a,E as I}from"./index-BTUEMLf5.js";import{d as h,w as k,o as _,r as l,a0 as b,b as w,H as D,D as p,I as n,F as E,e as i}from"./lucide-_oCiFqes.js";import"./Container-DwB3rN_Z.js";import"./index-kQIztB-E.js";import"./vuetify-BaCqMXPP.js";import"./Toolbar-CaFrSIBc.js";import"./userPreferences-XD50db6K.js";import"./vue-router-DvALZv_2.js";import"./Button-GSo8rtij.js";import"./ListItem-MmQyHMan.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-TaIM0H3y.js";import"./MediaItemThumb-BaHIgYra.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-DjFjyMgl.js";import"./vue-i18n-Dtd59yt5.js";import"./PanelviewItemCompact-CLqGya98.js";import"./marquee_text_sync-C0q0U3mh.js";import"./index-CpZ4YSWB.js";import"./reka-ui-BT9Jz-E-.js";import"./vueuse-CtSQZy69.js";import"./index-MfQlFusE.js";import"./DialogTitle.vue_vue_type_script_setup_true_lang-DOHf3CAT.js";import"./DialogFooter.vue_vue_type_script_setup_true_lang-CmePkLod.js";import"./qrcode-fG4AAl2w.js";import"./marked-i_gIkIP3.js";import"./color-BTziYnFN.js";/* empty css            */import"./swiper-B7iBjdLa.js";const et=h({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(u){const e=u,o=l(!1),t=l(),d=async function(){t.value=await a.getPlaylist(e.itemId,e.provider)};k(()=>e.itemId,r=>{r&&d()},{immediate:!0}),_(()=>{const r=a.subscribe(I.MEDIA_ITEM_UPDATED,s=>{const m=s.data;t.value?.uri==m.uri&&(t.value=m,o.value=!0)});b(r)});const c=async function(r){return await a.getPlaylistTracks(e.itemId,e.provider,r.refresh)};return(r,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:r.$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{et as default};
