import{I as f}from"./ItemsListing-CqOkN5bP.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-BaDwFhok.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,b as D,e as m,q as p,F as g,o as r}from"./index-BLuBzgcR.js";import"./Container-BVutxj42.js";import"./index-CBho6rsP.js";import"./VContainer-DOe7JF0h.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-RSDUeNZR.js";import"./VToolbar-BFOvSQM-.js";import"./VBtn-i8gedOhv.js";import"./Button-BEhYIX-0.js";import"./ListItem-D3UfOTqB.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dwz4QKKd.js";import"./VInput-S8c2HXsf.js";import"./MediaItemThumb-4FqrTjbr.js";import"./PanelviewItemCompact-Czo8xJLH.js";import"./VSpacer-FdmIBMIx.js";import"./VTextField-BRzkPyuL.js";import"./VInfiniteScroll-XtiIpwbc.js";import"./layout-Dtt5lK8k.js";import"./VRow-Dw7kUaJt.js";import"./VVirtualScroll-JP5E3DQw.js";import"./VAlert-Du-laR0E.js";import"./marquee_text_sync-CbqHGytl.js";import"./VDialog-CUNnqGJy.js";const X=_({__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{X as default};
