import{I as v}from"./ItemsListing-DtfmXfFy.js";import{I as y,_ as h}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-GZJyfnuO.js";import{d as k,r as m,K as I,o as _,b as r,a9 as b,a as w,c as i,h as D,f as g,e as p,j as n,F as E}from"./index-B3YJYWuL.js";import"./VCheckbox-D78puUFe.js";import"./eventbus-DvpacjVb.js";import"./VListItem-cb3L497C.js";import"./VCheckboxBtn-BhpuHI0t.js";import"./VList-BLfQAYp3.js";import"./VCardText-DRLEFzMp.js";import"./VCard-RO2j5jca.js";import"./VMenu-Drg4ytVq.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-Dphq6JqC.js";import"./Button-BHspLwId.js";import"./VSpacer-5KTSJ8al.js";/* empty css              */import"./PanelviewItemCompact-CcNCJwVO.js";import"./VAlert-zURyjIT6.js";import"./Container-Bdq9NOs-.js";import"./Toolbar-CHKFZ92z.js";import"./VToolbar-DXSH_jsU.js";import"./VTextField-D-qeMwbB.js";import"./VInfiniteScroll-u7iLmbut.js";import"./layout-DE_eHv51.js";import"./VVirtualScroll-Dq9UVklv.js";import"./VDialog-I4GvG3FU.js";const Y=k({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(u){const t=u,o=m(!1),e=m(),d=async function(){e.value=await r.getPlaylist(t.itemId,t.provider)};I(()=>t.itemId,a=>{a&&d()},{immediate:!0}),_(()=>{const a=r.subscribe(b.MEDIA_ITEM_UPDATED,s=>{var l;const f=s.data;((l=e.value)==null?void 0:l.uri)==f.uri&&(o.value=!0)});w(a)});const c=async function(a){return await r.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,s)=>(i(),D(E,null,[g(y,{item:e.value},null,8,["item"]),e.value?(i(),p(v,{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":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.${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(),p(h,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)],64))}});export{Y as default};
