import{R as b,k as A,o as S,S as R,b as g,a4 as E,j as t,ar as f,h as e,i as r,dn as v,dp as x,D as C}from"./app-BgLa5dit.js";import{u as I}from"./ekVIVtrT.chunk.js";import{D as p}from"./BE59vaMU.chunk.js";import{D as j}from"./BYqcacqE.chunk.js";import"./KIVqng-q.chunk.js";import"./0GREfvNX.chunk.js";import"./JAv_fVmZ.chunk.js";import"./B5-QmNlz.chunk.js";import"./CTg_3F42.chunk.js";import"./DEF_vJGe.chunk.js";import"./CGQPfl0D.chunk.js";function H(i){const[o,d]=b.useState(!0),n=A();function c(s){return p.dashboards({targetType:C.Discover,presentationId:i.presentationId},o,s)}function D(s){n(c(s))}const h=I(c,D),a=S(R.presentation(i.presentationId)),{hasPermissions:m}=g();function u(s){return n(p.updateDashboard(s.id,s))}const l=m(E.DiscoverDashboardStatusUpdate);return a.data?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"mt-3",children:[t.jsx("h6",{children:`Presentation: ${a.data.name}`}),t.jsx("p",{children:a.data.description})]}),t.jsx(j,{presentation:a.data,dashboards:h.items,onStatusChange:u,canPublish:l,columns:v.getColumnSet(x.DiscoverDashboard),filterArchivedDashboards:o,setFilterArchivedDashboards:d,getEditDetailsAppLink:s=>({application:r.DISCOVER,action:e.Discover.EDIT_DISCOVER_DASHBOARD_DETAILS,args:[s]}),getDeleteAppLink:s=>({application:r.DISCOVER,action:e.Discover.DELETE_DASHBOARD,args:[s]}),getNewDashboardAppLink:()=>({application:r.DISCOVER,action:e.Discover.NEW_DASHBOARD,args:[i.presentationId]}),getCopyDashboardAppLink:s=>({application:r.DISCOVER,action:e.Discover.COPY_DASHBOARD,args:[s]})})]}):t.jsx("div",{className:"text-center py-3",children:t.jsx(f,{as:"div",animation:"border",role:"status"})})}export{H as EditDiscoverDashboardListView};
//# sourceMappingURL=D_lt2xbt.chunk.js.map
