import{u,h as g}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as s}from"./index-NdkWRN8K.js";import{F as f}from"./Field-DH3L8v09.js";import{e as h,d as j}from"./Typography-Cz6D417Y.js";import{u as F}from"./useUniqueId-Bsgqe1tm.js";import{j as t}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 M=g.fieldset(({odysseyDesignTokens:e})=>({border:"0",margin:e.Spacing0,marginBlockEnd:e.Spacing6,maxWidth:e.TypographyLineLengthMax,padding:e.Spacing0,"&:last-child":{marginBlockEnd:e.Spacing0}})),S=({alert:e,children:d,description:r,id:o,isDisabled:i=!1,legend:n,name:m,testId:l,translate:a})=>{const p=u(),c=F(o),x=s.useMemo(()=>({isDisabled:i}),[i]);return t.jsxs(M,{"data-se":l,disabled:i,id:c,name:m,odysseyDesignTokens:p,children:[t.jsx(h,{translate:a,children:n}),r&&t.jsx(j,{translate:a,children:r}),e,t.jsx(f.Provider,{value:x,children:d})]})},E=s.memo(S);E.displayName="Fieldset";export{E as M};
