1import{t as e}from"./jsx-runtime.B3_jS9r6.js";import{t}from"./utilities.zKPpsOjM.js";import{n as a,t as r}from"./colors-mapping.D5UrIWcz.js";import{i}from"./src.BReuYsqT.js";import{t as s}from"./src.CDb0__AS.js";import{t as l}from"./src.71kJL_bC.js";import{t as n}from"./button.styles.CgGQbucq.js";import{n as o,t as c}from"./src.DF5fyvXD.js";import{t as m}from"./src.C_hWcDtR.js";var d=e(),u={"2upCards":"2Cards","3upCards":"3Cards","4upCards":"4Cards",cardLeft2Articles:"feature"},p=(e,p)=>{if(!e.DynamicContentSource?.length&&!e.DirectContentSource?.length)return null;const{BlockHeader:x,BlockHeaderSize:f,BackGroundColor:g,BlockIcon:k,CardLink:h,BlockLink:b,BlockIconAltText:C,CardLayoutStyle:j,BoolCardOutline:L,DirectContentSource:y,DynamicContentSource:w}=e,{CardLinkLabel:v="",CardLinkStyle:T}=h,{scheme:D,bgClass:I}=a(g??r.Teal),S=y?.length?y.map(e=>{const{Title:t,MetaDescription:a,ImageAltText:r,PrimaryTag:s,RelativePath:l,Image:n,Video:o}=e?.ContentLink?.Expanded??{};return{title:t||"",description:a||"",image:i(n?.Url)||"",altImage:r||t||"",linkText:v||"",eyebrow:s?.[0]?.Description||"",href:l||"",videoUrl:o?.VideoURL||""}}):[],U=w?.length?w.map(e=>{const{Title:t,MetaDescription:a,PrimaryTag:r,EventType:s,RelativePath:l,Image:n,Video:o}=e??{},c=r?.[0]?.Description||s?.Description||"";return{title:t||"",description:a||"",image:i(n?.Url)||"",altImage:t||"",linkText:v||"",eyebrow:c,href:l||"",videoUrl:o?.VideoURL||""}}).filter(e=>e.title):[],B={title:x||"",icon:k?.Url||"",linkStyle:"button"===T?"button":"textLink",buttonLabel:b?.LinkText||"",buttonLink:b?.LinkUrl||"",altIcon:C||"",type:u[j||"2upCards"],outline:L,cardList:S.length?S:U.length?U:[]},{icon:N,title:M,buttonLabel:P,buttonLink:R,altIcon:V}=B;let A="";switch(f){case c.Large:A="text-display-sm";break;case c.Medium:A="text-heading-lg";break;case c.Small:A="text-heading-md"}return(0,d.jsx)("div",{className:t("py-10 md:py-20",I),"data-testid":"web-card-grid","data-scheme":D,children:(0,d.jsxs)(l,{children:[(0,d.jsxs)("div",{className:"mb-8 flex w-full flex-col items-center justify-between gap-4 md:flex-row md:gap-8",children:[(0,d.jsx)(o,{text:M,icon:N,alt:V,className:"mb-0 grow",textClassName:A}),P&&R&&(0,d.jsx)("div",{className:"mb-0 flex w-full flex-none items-center justify-end md:w-auto",children:(0,d.jsx)(s,{href:R,"data-testid":"card-link",className:t(n({variant:"outline",size:"md"}),"block w-full text-center hover:decoration-2 md:w-auto"),children:P})})]}),(0,d.jsx)(m,{className:p,...B})]})})};export{p as CardGrid};
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.