import{I as f}from"./ItemsListing-e8i_b9av.js";import{I as v}from"./InfoHeader-CuZUyPdA.js";import{_ as y}from"./ProviderDetails.vue_vue_type_style_index_0_lang-hk8Jt5sR.js";import{a as r,E as h}from"./index-Cc0s9xHj.js";import{d as k,w as I,o as _,r as m,a3 as b,c as w,J as D,G as p,K as n,F as E,b as i}from"./lucide-C_a_D9Y7.js";import"./Container-C8q3OdIF.js";import"./index-kQIztB-E.js";import"./vuetify-CvGbteJu.js";import"./Toolbar-CpDb2XyG.js";import"./userPreferences-CgJSfdV_.js";import"./vue-router-lrCq0UAu.js";import"./Button-CCvS9sA_.js";import"./ListItem-Ct4Nbn6d.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DhKX4Vvj.js";import"./MediaItemThumb-CN3YtoJY.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-7ardqVNw.js";import"./vue-i18n-COI_JhGQ.js";import"./PanelviewItemCompact-CL6Psz6q.js";import"./marquee_text_sync-C4anEqYx.js";import"./MarqueeText-Dmids8zS.js";import"./qrcode-DICVlH4J.js";import"./marked-D9eDbhZJ.js";import"./color-CqFg8eif.js";import"./vueuse-Blk5jQ0T.js";/* empty css            */import"./swiper-UowLVX5q.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};
