import{I as f}from"./ItemsListing-DTH9nBqi.js";import{I as v,_ as y}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CNd2Ys0f.js";import{d as h,r as l,ae as k,m as I,v as r,b2 as _,q as b,c as w,b as D,h as m,e as p,F as g,o as i}from"./index-CoB_2BUd.js";import"./Container-BzMt4Ci6.js";import"./index-kQIztB-E.js";import"./VContainer-DlTgmJKi.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-B0keKpNj.js";import"./VToolbar-CJXC56GW.js";import"./VBtn-hyLqVrgl.js";import"./Button-BDPKHRLH.js";import"./ListItem-DQin6AeB.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-rRluqShO.js";import"./VInput-BoZgh6ys.js";import"./MediaItemThumb-BKmjY3cv.js";import"./PanelviewItemCompact-B9m_eVXB.js";import"./VSpacer-C76jgahG.js";import"./VTextField-DbD7hU_y.js";import"./VInfiniteScroll--D1O9T4-.js";import"./layout-CPyFIpzx.js";import"./VRow-CLgWC1Pi.js";import"./VVirtualScroll-CSh2i2e_.js";import"./VAlert-C67nJg0B.js";import"./marquee_text_sync-IliXMDRi.js";import"./VDialog-ByOT2kqj.js";const X=h({__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}),I(()=>{const a=r.subscribe(_.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{X as default};
