"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7930],{47761:(f,s,n)=>{n.d(s,{l:()=>g});var a=n(74848),E=n(22803),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})})}},80127:(f,s,n)=>{n.r(s),n.d(s,{NewOrgPage:()=>_,default:()=>r});var a=n(74848),E=n(71468),c=n(44617),m=n(86489),g=n(34128),O=n(54594),P=n(47761),o=n(54122),e=n(88023),d=n(80713);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.Y,{navId:"global-orgs",pageNav:D,children:(0,a.jsxs)(o.Y.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.64dcbba1f71dbfce1440.js.map