import{I as f}from"./ItemsListing-6VW59A0B.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CXwX75cg.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-C-Ivu3jU.js";import"./Container-DVyc_Yt_.js";import"./index-kQIztB-E.js";import"./VContainer-CNNJtZg6.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-CLPRlZ-4.js";import"./VToolbar-DTucOBiF.js";import"./Button-FtStaD9_.js";import"./ListItem-BLmrgznL.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B5IzKSW4.js";import"./VCheckboxBtn-BmKOjEU4.js";import"./VInput-CnrZS6Kh.js";import"./MediaItemThumb-BsXB7IV6.js";import"./PanelviewItemCompact-5_ppRL3T.js";import"./VTextField-Bkx949P5.js";import"./VSnackbar-C_PtJN1U.js";import"./layout-D2NB7OTD.js";import"./VRow-DOG0WeJD.js";import"./VVirtualScroll-C_Lzj3jv.js";import"./VAlert-B3qbTkCR.js";import"./marquee_text_sync-DUGxi-pZ.js";import"./VDialog-BZuFHdVP.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};
