"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7930],{74410(u,s,n){n.d(s,{l:()=>c});var a=n(74848),g=n(22803),o=n(96540),E=n(49785);function c({defaultValues:l,onSubmit:m,validateOnMount:_=!1,validateFieldsOnMount:e,children:d,validateOn:O="onSubmit",maxWidth:t=600,...P}){const{handleSubmit:D,trigger:r,formState:i,...h}=(0,E.mN)({mode:O,defaultValues:l});return(0,o.useEffect)(()=>{_&&r(e)},[r,e,_]),(0,a.jsx)("form",{className:(0,g.css)({maxWidth:t!=="none"?t+"px":t,width:"100%"}),onSubmit:D(m),...P,children:d({errors:i.errors,formState:i,trigger:r,...h})})}},45408(u,s,n){n.r(s),n.d(s,{NewOrgPage:()=>r,default:()=>i});var a=n(74848),g=n(71468),o=n(92745),E=n(45861),c=n(37386),l=n(16780),m=n(63527),_=n(74410),e=n(13791),d=n(65642),O=n(93922);const t={createOrganization:O.EC},P=(0,g.connect)(void 0,t),D={icon:"building",id:"org-new",text:"New organization"},r=({createOrganization:h})=>{const C=async M=>{await h(M),window.location.href=(0,d.zj)().appSubUrl+"/org"};return(0,a.jsx)(e.Y,{navId:"global-orgs",pageNav:D,children:(0,a.jsxs)(e.Y.Contents,{children:[(0,a.jsx)("p",{className:"muted",children:(0,a.jsx)(o.x6,{i18nKey:"org.new-org-page.description",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)(_.l,{onSubmit:C,children:({register:M,errors:f})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.n,{children:(0,a.jsx)(c.D,{label:(0,o.t)("org.new-org-page.label-organization-name","Organization name"),invalid:!!f.name,error:f.name&&f.name.message,children:(0,a.jsx)(m.p,{placeholder:(0,o.t)("org.new-org-page.placeholder-org-name","Org name"),...M("name",{required:"Organization name is required"})})})}),(0,a.jsx)(E.$n,{type:"submit",children:(0,a.jsx)(o.x6,{i18nKey:"org.new-org-page.create",children:"Create"})})]})})]})})},i=P(r)}}]);

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