"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7930],{72235:(f,s,n)=>{n.d(s,{l:()=>g});var a=n(74848),E=n(32196),c=n(96540),m=n(49785);function g({defaultValues:O,onSubmit:P,validateOnMount:o=!1,validateFieldsOnMount:e,children:d,validateOn:l="onSubmit",maxWidth:t=600,...D}){const{handleSubmit:_,trigger:r,formState:i,...h}=(0,m.mN)({mode:l,defaultValues:O});return(0,c.useEffect)(()=>{o&&r(e)},[r,e,o]),(0,a.jsx)("form",{className:(0,E.css)({maxWidth:t!=="none"?t+"px":t,width:"100%"}),onSubmit:_(P),...D,children:d({errors:i.errors,formState:i,trigger:r,...h})})}},25913:(f,s,n)=>{n.r(s),n.d(s,{NewOrgPage:()=>_,default:()=>r});var a=n(74848),E=n(71468),c=n(84167),m=n(88575),g=n(10354),O=n(55852),P=n(72235),o=n(21780),e=n(2913),d=n(32931);const l={createOrganization:d.EC},t=(0,E.connect)(void 0,l),D={icon:"building",id:"org-new",text:"New organization"},_=({createOrganization:i})=>{const h=async M=>{await i(M),window.location.href=(0,e.zj)().appSubUrl+"/org"};return(0,a.jsx)(o.YW,{navId:"global-orgs",pageNav:D,children:(0,a.jsxs)(o.YW.Contents,{children:[(0,a.jsx)("p",{className:"muted",children:"Each organization contains their own dashboards, data sources, and configuration, which cannot be shared shared between organizations. While users might belong to more than one organization, multiple organizations are most frequently used in multi-tenant deployments."}),(0,a.jsx)(P.l,{onSubmit:h,children:({register:M,errors:u})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.n,{children:(0,a.jsx)(m.D,{label:"Organization name",invalid:!!u.name,error:u.name&&u.name.message,children:(0,a.jsx)(g.p,{placeholder:"Org name",...M("name",{required:"Organization name is required"})})})}),(0,a.jsx)(O.$n,{type:"submit",children:"Create"})]})})]})})},r=t(_)}}]);

//# sourceMappingURL=NewOrgPage.cf05cb4eca33c44ed6cb.js.map