"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),i=require("../../utils/cn/cn.cjs.js"),u=require("./components/CtaFeaturedIn.cjs.js"),a=require("../../src/modules/FeaturedIn/featuredIn.module.css"),l=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js");function m({media:r}){return e.jsx("div",{className:a.mediaFeaturedInBlock,children:r.filter(n=>!!n.logo).map(({logo:n,url:s},o)=>{const t=s?"a":"div";return e.jsx(t,{href:s,target:"_blank",rel:"noopener noreferrer",className:a.mediaFeaturedInImageContainer,children:e.jsx("div",{className:a.mediaFeaturedInImage,style:{backgroundImage:`url(${n})`}})},`${s}_${o}`)})})}function p({quote:r,source:n}){return e.jsxs("div",{className:a.quoteFeaturedInBlock,children:[e.jsxs(l.Typography,{as:"p",defaultVariant:"headingSm",mobileVariant:"headingXxs",className:a.quoteFeaturedInText,children:["“",r,"”"]}),n&&e.jsxs(l.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.quoteFeaturedInSource,children:["— ",n]})]})}function h({label:r,title:n,content:s,colorScheme:o="light"}){return e.jsxs("section",{className:i.cn(a.container,a[o]),children:[e.jsx(l.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:a.label,children:r}),n&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:i.cn(a.title,a.customTitle),children:n}),e.jsx(l.Typography,{as:"p",defaultVariant:"displayMd",className:i.cn(a.title,a.defaultTitle),children:n})]}),e.jsx(d.InfiniteScroll,{items:s,contentClassName:a.content,itemClassName:a.item,rootClassName:a.scrollRoot,renderItem:t=>e.jsxs(c.Fragment,{children:[t.type==="media"&&e.jsx(m,{media:t.media}),t.type==="quote"&&e.jsx(p,{quote:t.quote,source:t.source}),t.type==="cta"&&e.jsx(u.CtaFeaturedIn,{buttonLabel:t.button_label,buttonLink:t.button_link})]},t.type)})]})}exports.FeaturedIn=h;
