import{dk as d,l as c,o as p,S as h,j as a,E as l,G as u,H as D,y as b,I as g,a as m,D as A,g as S,h as f,i as R}from"./app-BgLa5dit.js";import{D as T,E as w}from"./LqVj63BJ.chunk.js";import{D as y}from"./BE59vaMU.chunk.js";import"./KIVqng-q.chunk.js";function I(e){const o=d(),s=c(),t=p(h.presentation(e.presentationId));function n(r){o(y.createDashboard({name:r.name,description:r.description,target:m.getDashboardTarget({targetType:A.Discover,presentationId:e.presentationId}),learningLevel:t.data.learningLevel,userType:g.Any,status:b.Draft,contentRegion:D.GLOBAL},i=>{s.success("Successfully created the dashboard"),S.trigger({application:R.DASHBOARD_EDITOR,action:f.DashboardEditor.EDIT_DASHBOARD,args:[i.id]})},()=>{s.error("Something went wrong when creating the dashboard"),e.closePopup()}))}return a.jsx(l,{title:"Create new dashboard",closePopup:e.closePopup,children:t.data&&a.jsx(u,{initialValues:{name:"",description:""},validationSchema:T,onSubmit:n,children:a.jsx(w,{closePopup:e.closePopup,dashboardWidgets:[],isNew:!0})})})}export{I as NewDiscoverDashboardView};
//# sourceMappingURL=7z1ZpNL3.chunk.js.map
