import{I as f}from"./ItemsListing-BHlkb6-j.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-bItMFJVo.js";import{d as _,i as l,ad as k,j as I,m as i,a_ as h,l as b,c as w,o as r,b as D,e as m,q as p,F as g}from"./index-LFx1jIjH.js";import"./Container-CuH2YNr5.js";import"./Button-SUce42c3.js";import"./VBtn-BYKkZzw0.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-or1Uze2V.js";/* empty css              */import"./Toolbar-iQxHKI_C.js";import"./VToolbar-Dc2WDt1C.js";import"./ListItem-DhvO1M3C.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B4veTxLS.js";import"./VInput-B3Z2GK8Z.js";import"./MediaItemThumb-cYqdWFcl.js";import"./PanelviewItemCompact-Bf82DAtE.js";import"./VSpacer-Cg-cZSyv.js";import"./VTextField-DyzwZgKh.js";import"./VInfiniteScroll-DH2IK80_.js";import"./layout-C6GuZOkj.js";import"./VRow-cyJLSUM5.js";import"./VVirtualScroll-DYZmdOFl.js";import"./VAlert-Cyb25ra3.js";import"./marquee_text_sync-AxiznPti.js";import"./VDialog-zNF2U_x9.js";const W=_({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(n){const t=n,o=l(!1),e=l(),u=async function(){e.value=await i.getPlaylist(t.itemId,t.provider)};k(()=>t.itemId,a=>{a&&u()},{immediate:!0}),I(()=>{const a=i.subscribe(h.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 i.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,s)=>(r(),w(g,null,[D(v,{item:e.value},null,8,["item"]),e.value?(r(),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"])):p("",!0),e.value?(r(),m(y,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)],64))}});export{W as default};
