import{I as f}from"./ItemsListing-t4zttHcu.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-DKVZaoMX.js";import{U as I,x as l,w as k,o as _,a6 as r,aY as b,b as h,a0 as w,X as i,F as D,W as m,ab as p,I as g}from"./index-B-lUZalq.js";import"./Container-Br6JH6Pm.js";import"./Button-kSJGA_Pw.js";import"./VBtn-BPJ1JKW-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-DB65WVbe.js";/* empty css              */import"./Toolbar-BvxWbi_E.js";import"./VToolbar-RljK0PC9.js";import"./ListItem-LV_WU--g.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DnroVGI-.js";import"./VInput-BWBQqjuk.js";import"./MediaItemThumb-DapaMoP4.js";import"./PanelviewItemCompact-CIDxIfoQ.js";import"./VSpacer-DDLrofv-.js";import"./VTextField-B-d5Pe9I.js";import"./VInfiniteScroll-CKZj-VKd.js";import"./layout-BuzUTwrQ.js";import"./VRow-BQOTE9C_.js";import"./VVirtualScroll-CceW16X7.js";import"./VAlert-QHTIcuEJ.js";import"./marquee_text_sync-D7pvlIaW.js";import"./VDialog-CAgq0L03.js";const Q=I({__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)};k(()=>t.itemId,a=>{a&&u()},{immediate:!0}),_(()=>{const a=r.subscribe(b.MEDIA_ITEM_UPDATED,s=>{const c=s.data;e.value?.uri==c.uri&&(o.value=!0)});h(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{Q as default};
