import{I as v}from"./ItemsListing-DWzn5l67.js";import{I as y,_ as k}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CgqIxdYx.js";import{Q as I,x as m,w as _,o as h,a4 as r,aS as b,b as w,Z as D,B as g,R as p,a9 as n,G as B,S as i}from"./index-DdI--Yet.js";import"./MediaItemThumb-DHcqTVjl.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-D41gG9IS.js";import"./VChip-BBcriFso.js";import"./VBtn-g6NhQ7fK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-BK1DMsnV.js";import"./VCheckbox-B4YfxJ0R.js";import"./VCheckboxBtn-BWCQ3DqN.js";import"./PanelviewItemCompact-kTIN1Q1A.js";import"./VSpacer-DDLLNEUh.js";/* empty css              */import"./Container-B4zACZDu.js";import"./VContainer-BtdP8B7E.js";import"./Toolbar-BGUFqu6B.js";import"./VToolbar-DRvSLcNG.js";import"./VTextField-CkYsZnxG.js";import"./VInfiniteScroll-B6R5NfAO.js";import"./layout-CiO1VcK1.js";import"./VRow-VEN0m6ZM.js";import"./VVirtualScroll-D10a-qpl.js";import"./VAlert-CIZAmx66.js";import"./marquee_text_sync-BWVVy3ud.js";import"./VDialog-Babb4d0Q.js";const X=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(),D(B,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(k,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)],64))}});export{X as default};
