import{u as T,h as t}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as S}from"./index-NdkWRN8K.js";import{b as k,d as F}from"./Typography-Cz6D417Y.js";import{u as M}from"./useUniqueId-Bsgqe1tm.js";import{j as e}from"./jsx-runtime-CnH95YSl.js";/*!
 * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
 *
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * See the License for the specific language governing permissions and limitations under the License.
 */const W=["application/x-www-form-urlencoded","application/json","multipart/form-data","text/plain"],q=["on","off"],A=["post","get","dialog"],C=t.form(({isFullWidth:o,odysseyDesignTokens:s})=>({maxWidth:o?"100%":s.TypographyLineLengthMax,margin:0,padding:0})),D=t.div(({odysseyDesignTokens:o})=>({marginBlockEnd:o.Spacing4})),E=t.div({display:"flex",justifyContent:"flex-end"},({odysseyDesignTokens:o})=>({gap:o.Spacing1,marginBlockStart:o.Spacing7})),V=({alert:o,autoCompleteType:s,children:m,description:a,encodingType:p,formActions:i,id:l,isFullWidth:c,method:g,name:u,noValidate:y=!1,onSubmit:f,target:x,testId:h,title:r,translate:d})=>{const j=M(l),n=T();return e.jsxs(C,{autoComplete:s,"data-se":h,encType:p,id:j,isFullWidth:c,method:g,name:u,noValidate:y,odysseyDesignTokens:n,onSubmit:f,target:x,children:[e.jsxs(D,{odysseyDesignTokens:n,children:[r&&e.jsx(k,{component:"h1",translate:d,children:r}),a&&e.jsx(F,{translate:d,children:a}),o]}),e.jsx("div",{children:m}),i&&e.jsx(E,{odysseyDesignTokens:n,children:i})]})},b=S.memo(V);b.displayName="Form";export{b as M,W as a,q as b,A as f};
