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