import{I as f}from"./ItemsListing-C49HRbSG.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-BrpUE5JN.js";import{av as k,H as l,J as I,a3 as _,aL as r,b6 as h,a4 as b,aw as w,x as D,aD as m,ay as p,ag as g,ax as i}from"./index-9wFVyQJF.js";import"./Container-BJrCSObY.js";import"./index-kQIztB-E.js";import"./VContainer-Bmll2nQh.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-DKtKPcsg.js";import"./VToolbar-BKGXqxdt.js";import"./Button-C-VEz_LI.js";import"./ListItem-UwdbG-Br.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-BsGozMKb.js";import"./VCheckboxBtn-DtwUx7x8.js";import"./VInput-Bym6CXFb.js";import"./MediaItemThumb-CIzEvLC1.js";import"./PanelviewItemCompact-Bh2HNG1g.js";import"./VTextField-DJZc05eK.js";import"./VSnackbar-B7zT2MUe.js";import"./layout-BdbtgIRG.js";import"./VRow-plcqQvnb.js";import"./VVirtualScroll-H5Wikvf-.js";import"./VAlert-D47QZ7qK.js";import"./marquee_text_sync-D3Qu1KPM.js";import"./VDialog-BPGCUfED.js";const S=k({__name:"PlaylistDetails",props:{itemId:{},provider:{}},setup(n){const t=n,o=l(!1),e=l(),u=async function(){e.value=await r.getPlaylist(t.itemId,t.provider)};I(()=>t.itemId,a=>{a&&u()},{immediate:!0}),_(()=>{const a=r.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 r.getPlaylistTracks(t.itemId,t.provider,a.refresh)};return(a,s)=>(i(),w(g,null,[D(v,{item:e.value},null,8,["item"]),e.value?(i(),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?(i(),m(y,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)],64))}});export{S as default};
