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 T,i as f}from"./app-BgLa5dit.js";import{D as v,E as R}from"./LqVj63BJ.chunk.js";import{D as w}from"./BE59vaMU.chunk.js";import"./KIVqng-q.chunk.js";function I(e){const r=d(),s=c(),t=p(h.presentation(e.presentationId));function n(o){r(w.createDashboard({name:o.name,description:o.description,target:m.getDashboardTarget({targetType:A.MoviesAndTv,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:f.DASHBOARD_EDITOR,action:T.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:v,onSubmit:n,children:a.jsx(R,{closePopup:e.closePopup,dashboardWidgets:[],isNew:!0})})})}export{I as NewMoviesAndTvDashboardView};
//# sourceMappingURL=DlpVQH8f.chunk.js.map
