import{I as v}from"./ItemsListing-27042dbc.js";import{I as y,_ as k}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-ab04a104.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-d8f72d9c.js";import"./VCheckbox-78132c43.js";import"./eventbus-55fa23b1.js";import"./VListItem-99f39ae4.js";import"./VCheckboxBtn-c3c8d14c.js";import"./VList-288ded64.js";import"./VCardText-361d19f4.js";import"./VCard-120d3152.js";import"./VMenu-c477cd50.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-d2f27c63.js";import"./Button-257b972a.js";import"./VSpacer-b6fa50b4.js";/* empty css              */import"./PanelviewItemCompact-f59c8796.js";import"./VAlert-74e6b24d.js";import"./Container-b694a4b0.js";import"./Toolbar-171f4c01.js";import"./VToolbar-46cf4633.js";import"./VTextField-1865982e.js";import"./VInfiniteScroll-8a11bc5d.js";import"./layout-3d7c6c32.js";import"./VVirtualScroll-b2e23632.js";import"./VDialog-4a0cd9eb.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};
