import{o as e,j as s,h as r,gm as p,a3 as h,aR as m,i as d}from"./app-BgLa5dit.js";import{O as y}from"./B-fq6xxv.chunk.js";import{E as b}from"./Btd5W0GW.chunk.js";import{P as l}from"./DUyf8veO.chunk.js";import"./BfMtaC_g.chunk.js";function u(a){return{application:d.PLAYLISTS,action:r.Playlists.DASHBOARD,args:[a.dashboardId]}}function A(a){return[{label:"Remove playlist from dashboard",appLink:{application:d.PLAYLISTS,action:r.Playlists.DELETE_DASHBOARD_WIDGET,args:[a.dashboardId,a.id]},className:"text-danger"}]}function f(a){const c=e(l.playlist(a.playlistId)),t=e(l.dashboardWidgets(a.playlistId)),n=e(m.currentUser());return s.jsxs(s.Fragment,{children:[!!n.data&&s.jsx(b,{playlistId:a.playlistId,activeAction:r.Playlists.EDIT_PLAYLIST_DASHBOARDS,currentUser:n.data}),s.jsx(y,{object:c.data}),!!t.data&&(t.data.length?s.jsx(p,{objects:t.data,columns:[{header:"Dashboard",accessor:i=>{var o;return(o=i.dashboard)==null?void 0:o.name},appLink:u},{accessor:i=>s.jsx("span",{className:"d-flex justify-content-end",children:s.jsx(h,{actions:A(i)})})}]}):s.jsx("p",{children:"This playlist isn't in any dashboards."}))]})}export{f as EditPlaylistDashboardsView};
//# sourceMappingURL=CYAViTwp.chunk.js.map
