import{I as f}from"./ItemsListing-D_KqSTZS.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-B_OXjTPr.js";import{ay as I,J as l,L as h,a3 as k,aP as r,bb as _,a4 as b,az as w,aA as i,o as D,aI as m,aB as n,ah as P}from"./index-BRUnowC8.js";import"./Container-ZHtGcXZO.js";import"./index-kQIztB-E.js";import"./Toolbar-BEJzY0mB.js";import"./VToolbar-DS4mUdOC.js";import"./Button-BKv4xLAv.js";import"./ListItem-jfbxOrad.js";import"./userPreferences-DBWZCHKf.js";import"./VCheckboxBtn-D390s4L9.js";import"./VSelectionControl-Co1cRcmS.js";import"./MediaItemThumb-CIE9_Elw.js";import"./PanelviewItemCompact-CsJmi5IT.js";import"./VInfiniteScroll-BORsRMGl.js";import"./VVirtualScroll-htzu2YXu.js";import"./VAlert-DQxypmdN.js";import"./marquee_text_sync-BajKmu-m.js";import"./VDialog-Bh3mGVOy.js";const G=I({__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)};h(()=>t.itemId,a=>{a&&u()},{immediate:!0}),k(()=>{const a=r.subscribe(_.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(P,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{G as default};
