1import{j as t,B as m,e as h,b as u,W as f,X as g,S as j,A as E}from"../js/app.CzHXv3OC.js";import{W as S}from"./Wrapper.DVjqp0wx.js";import{E as A}from"./EmptyState.CRCj9Gxe.js";import{R as d}from"./RawHTML.CKhpYO-a.js";import{r as T}from"./elastic.CDqqVJuy.js";import{E as v}from"./ErrorBoundary.BSDeRbzo.js";import{F as C}from"./FetchModel.b4lX_zup.js";import{e as c}from"./error.ME9RekgK.js";import{d as y,e as $,A as M,a as B,b as H,g as N}from"./productObjectTable.8lbMw21N.js";import{f as w,z as l}from"./index.D6mVWLHx.js";import"./vendor.CLXKpVbq.js";import"./lodash.B7ss2v9R.js";import"./button.BLXcxSDr.js";function P(r){const{children:o,value:e,index:s,...a}=r;return t.jsx("div",{role:"tabpanel",hidden:e!==s,id:`simple-tabpanel-${s}`,"aria-labelledby":`simple-tab-${s}`,...a,children:e===s&&t.jsx(m,{sx:{p:3},children:t.jsx(h,{component:"div",children:o})})})}const i=new u({name:"tabs",prefix:"m-",outputIsString:!0});function R(r){return{id:`tab-${r}`,"aria-controls":`tabpanel-${r}`}}const G=({sections:r})=>{const[o,e]=T.useState(0),s=(a,n)=>{e(n)};return t.jsxs(m,{sx:{width:"100%"},className:i(),children:[t.jsx(m,{sx:{borderBottom:1,borderColor:"var(--aa-one-cms-palette-divider)"},className:i("divider"),children:t.jsx(f,{value:o,onChange:s,variant:"scrollable",scrollButtons:!0,allowScrollButtonsMobile:!0,children:r.map((a,n)=>t.jsx(g,{className:i("tab"),label:a.title,...R(n)},`tab-${n}`))})}),r.map((a,n)=>t.jsx(P,{value:o,index:n,className:i("tabPanel"),children:t.jsxs(j,{direction:"row",justifyContent:"space-evenly",alignItems:"stretch",spacing:2,className:i("tabStack"),children:[a.text&&t.jsx(d,{html:a.text}),a.text2&&t.jsx(d,{html:a.text2})]})},`TabPanel-${n}`))]})},b="AEHGridTabs",I=new u({name:b,prefix:"o-",outputIsString:!0}),W=N.extend({text:l.string().optional(),text2:l.string().optional(),title:l.string().optional()}),k=y.extend({tabs:l.array(W).optional(),configuration:$.extend({card:H.nullish(),table:B.nullish(),color:M.nullish()}).nullable()}),F=({componentModel:r})=>{var s,a,n,p;const o=k.safeParse(r);if(!o.success){const{error:x}=o;return console.error(`${b}: ${w(x).toString()}`),t.jsx(A,{illustration:t.jsx(c.illustration,{}),title:c.title,description:c.description})}const{data:e}=o;return t.jsx(S,{organismName:I(),paddingTop:(a=(s=e.configuration)==null?void 0:s.padding)==null?void 0:a.top,paddingBottom:(p=(n=e.configuration)==null?void 0:n.padding)==null?void 0:p.bottom,children:e.tabs&&t.jsx(G,{sections:e.tabs})})},_=({pathModelHTLAttribute:r,componentModelHTLAttribute:o})=>t.jsx(v,{children:t.jsx(E,{componentName:"aeh-grid-tabs",children:t.jsx(C,{pathModelHTLAttribute:r,componentModelHTLAttribute:o,children:(e,s)=>t.jsx(F,{pathModel:e,componentModel:s})})})});export{_ as AEHGridTabs};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.