"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8932],{55293:(I,n,a)=>{a.r(n),a.d(n,{default:()=>C});var e=a(65237),_=a(37149),l=a(49784),E=a(46181),m=a(5263),P=a(96682),c=a(6741),o=a(48389),d=a(38992),u=a(68532),f=a(31081),D=a(4036);const v={createNewFolder:D.W7},i=(0,_.connect)(null,v),M={folderName:""},O={text:"Create a new folder",subTitle:"Folders provide a way to group dashboards and alert rules.",breadcrumbs:[{title:"Dashboards",url:"dashboards"}]};function g({createNewFolder:T}){const[s]=(0,u.K)(),h=r=>{const t=typeof s.folderUid=="string"?s.folderUid:void 0;T(r.folderName,t)},U=r=>f.t.validateNewFolderName(r).then(()=>!0).catch(t=>t.message);return e.createElement(d.T,{navId:"dashboards/browse",pageNav:O},e.createElement(d.T.Contents,null,!l.v.featureToggles.topnav&&e.createElement("h3",null,"New dashboard folder"),e.createElement(E.l,{defaultValues:M,onSubmit:h},({register:r,errors:t})=>e.createElement(e.Fragment,null,e.createElement(m.g,{label:"Folder name",invalid:!!t.folderName,error:t.folderName&&t.folderName.message},e.createElement(P.I,{id:"folder-name-input",...r("folderName",{required:"Folder name is required.",validate:async A=>await U(A)})})),e.createElement(c.Lh,null,e.createElement(o.zx,{type:"submit"},"Create"),e.createElement(o.Qj,{variant:"secondary",href:`${l.v.appSubUrl}/dashboards`},"Cancel"))))))}const C=i(g)}}]);

//# sourceMappingURL=NewDashboardsFolder.839eb6112606d1e75042.js.map