import{I as v}from"./ItemsListing-a3071fce.js";import{I as y,_ as k}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-dba9e921.js";import{d as I,r as m,N as _,o as h,b as r,a7 as b,a as w,c as i,g,f as D,e as p,j as n,F as E}from"./index-e6082f30.js";import"./VCheckbox-a10abf59.js";import"./eventbus-1e2da4c1.js";import"./VListItem-91fe3ba6.js";import"./VCheckboxBtn-eb419bf7.js";import"./VList-80c1fded.js";import"./VCardText-67a28cbe.js";import"./VCard-745d9fc1.js";import"./VMenu-909c4fbd.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-522ad704.js";import"./Button-45ebc60e.js";import"./VSpacer-dd486a02.js";/* empty css              */import"./PanelviewItemCompact-55d2a2a0.js";import"./VAlert-161b165a.js";import"./Container-ae5e8bd5.js";import"./Toolbar-3c56accd.js";import"./VToolbar-d7a3a303.js";import"./VTextField-a74cff9a.js";import"./VInfiniteScroll-5323e13a.js";import"./layout-385ffd2e.js";import"./VVirtualScroll-625c3835.js";import"./VDialog-72578355.js";const Y=I({__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)};_(()=>t.itemId,a=>{a&&d()},{immediate:!0}),h(()=>{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(),g(E,null,[D(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(k,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)],64))}});export{Y as default};
