"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8932],{94883:(I,n,a)=>{a.r(n),a.d(n,{default:()=>g});var e=a(66111),s=a(67948),_=a(35645),E=a(94270),m=a(24799),P=a(46967),c=a(52081),l=a(31403),o=a(8412),u=a(96044),D=a(85385),f=a(61986);const i={createNewFolder:f.W7},M=(0,s.connect)(null,i),O={folderName:""},v={text:"Create a new folder",subTitle:"Folders provide a way to group dashboards and alert rules.",breadcrumbs:[{title:"Dashboards",url:"dashboards"}]};function C({createNewFolder:T}){const[d]=(0,u.K)(),U=r=>{const t=typeof d.folderUid=="string"?d.folderUid:void 0;T(r.folderName,t)},h=r=>D.t.validateNewFolderName(r).then(()=>!0).catch(t=>t.message);return e.createElement(o.T,{navId:"dashboards/browse",pageNav:v},e.createElement(o.T.Contents,null,e.createElement(E.l,{defaultValues:O,onSubmit:U},({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 h(A)})})),e.createElement(c.Lh,null,e.createElement(l.zx,{type:"submit"},"Create"),e.createElement(l.Qj,{variant:"secondary",href:`${_.v.appSubUrl}/dashboards`},"Cancel"))))))}const g=M(C)}}]);

//# sourceMappingURL=NewDashboardsFolder.c99db9ceeeacf5fa4e66.js.map