1import{j as e}from"./jsx-runtime-BgjmLhhW.js";import{r as S}from"./index-BqkNX_XC.js";import{b as z}from"./adobe-tracking-map-FuYnSgXJ-nXOxFVsQ.js";import{c as G,s as W}from"./generateReadableDate-CwmGI8_H-Bqz4Uw5l.js";import{$ as Z}from"./FaIcon-DTQallQy-Cfu02mpc.js";import{s as _}from"./Heading-Bq1a6-RI-C0aDwGkr.js";import{i as ee}from"./content-type-model-DfcDF4vP.js";import{c as ae}from"./Eyebrow-B9WLYrXR-CRyowg81.js";import{y as I}from"./Button-D1BZXwDH-BDkMigXz.js";import{c as ne}from"./BrandLogo-C58ua6u6-CO2cqo9o.js";import{w as re}from"./useDetectButtonWrap-UeJ9MYgj-BlwUsQjQ.js";import"./adobe-tracking-DpSHGK7T-QlveT4Bz.js";import"./index-DQ1x7BdZ-DBulPlol.js";import"./index-fN7hCOo3-DUOKOLJB.js";import"./_commonjsHelpers-BkfeUUK--CtUiGMfT.js";import"./keyboard-BZJvo5uC-D03dO0Qx.js";import"./cmx-logo--trOlMEY-DEHEXuOy.js";const oe=({experts:a=[],backgroundColor:o})=>e.jsx(e.Fragment,{children:a.map((n,i)=>{const t=n?.label,l=n?.link;return e.jsx("span",{className:"expert-items",children:l?e.jsx("span",{className:"expert-item expert-link",children:e.jsx("a",{href:l,className:`oneds-body-m-link ${o==="black"?"oneds-text-inverse expert-link-black":"oneds-text-default expert-link"} `,tabIndex:0,"data-link-event":z(t??""),children:t})}):e.jsx("span",{className:`oneds-body-m expert-item ${o==="black"?"oneds-text-inverse":"oneds-text-default"} `,children:t})},i)})}),te=({type:a,length:o,backgroundColor:n,marketingServiceUrl:i,minuteLabel:t,pageLengthLabels:l,typeLabel:s})=>{var r;const p=l?.[a]||l?.default,c=s?`${s} icon`:`${a} icon`;return e.jsxs("span",{className:"duration oneds-body-m",children:[e.jsx(Z,{iconId:(r=G[a])==null?void 0:r.iconName,className:"oneds-error-icon",color:n==="black"?"ffffff":"000000",marketingServiceUrl:i,width:"12px",height:"12px",ariaLabel:c}),`${o} ${t} ${p}`]})},le=({backgroundColor:a})=>e.jsx("span",{className:`${a==="black"||a==="accent"?"oneds-text-separator-inverse":"oneds-text-separator"} oneds-body-m`,children:"|"}),se=({timestamp:a,locale:o})=>{const n=S.useMemo(()=>W({timestamp:a,locale:o}),[a,o]);return e.jsx("span",{className:"publication-date oneds-body-m",children:n})},Ie=({heading:a,summary:o,experts:n=[],publicationDate:i,duration:t,contentType:l=ee.Text,translations:s,backgroundColor:r,isSummaryVisible:p=!1,marketingServiceUrl:c,locale:C,isEyebrowVisible:w=!1,eyebrow:P,attributesForEyebrow:$,showSecondaryButton:V=!1,buttonAppearance:U="primary",buttonLabelPrimary:u,buttonHrefPrimary:h="",buttonLabelSecondary:x,buttonHrefSecondary:g="",buttonIconVisiblePrimary:A=!1,buttonIconPrimary:M,buttonIconVisibleSecondary:B=!1,buttonIconSecondary:E,attributesForButtonLabelPrimary:F,attributesForButtonLabelSecondary:T,openingMethodPrimary:f,openingMethodSecondary:y,modalId:m,isBrandLogoVisible:H=!1,brandLogo:v,brandLogoAltText:R=""})=>{const D=s?.locale??C,J=S.useRef(null),K=re(".oneds-button-v2",[u,x]),O=r==="black",Q=!!i,X=t!==void 0&&t>=0,Y=n.filter(d=>!!d.label).length>0,k=!!(u&&(h||f==="modal"&&m)),j=!!(V&&x&&(g||y==="modal"&&m)),b=[];Q&&b.push(e.jsx(se,{timestamp:i,locale:D},"publication-date")),X&&b.push(e.jsx(te,{length:t,type:l,backgroundColor:r,marketingServiceUrl:c,minuteLabel:s?.minuteLabel,pageLengthLabels:s?.pageLengthLabels},"duration")),Y&&b.push(e.jsx(oe,{experts:n,backgroundColor:r},"expert-list"));const L=b.reduce((d,q,N)=>(N>0&&d.push(e.jsx(le,{backgroundColor:r},`separator-${N}`)),d.push(q),d),[]);return e.jsx("div",{className:`oneds-article-banner ${r==="black"?"oneds-text-inverse":""} `,ref:J,"data-background-color":r,children:e.jsx("div",{className:"container-fluid",children:e.jsx("div",{className:"row",children:e.jsx("div",{className:"col-sm-12 col-lg-11 col-xl-10",children:e.jsxs("div",{className:"article-banner-content",children:[H&&v&&e.jsx("div",{className:"article-banner-brand-logo",children:e.jsx(ne,{altText:R,brand:v,variant:"banner",isInverse:O})}),w&&e.jsx(ae,{text:P,attributes:$,className:"oneds-article-banner-eyebrow"}),e.jsx(_,{headingLevel:1,className:"oneds-heading-xxl",children:a}),L.length>0&&e.jsx("div",{className:"article-banner-detail",children:L}),p&&e.jsx("p",{className:"summary oneds-body-l",children:o}),(k||j)&&e.jsxs("div",{className:"oneds-button-wrapper",ref:K,children:[k&&e.jsx(I,{appearance:U,label:u??"",buttonLink:h,labelAttributes:F,openingMethod:f,parentComponentName:"article banner",modalId:m,buttonIcon:M,color:r==="black"?"inverse":"default",buttonIconVisible:A,buttonIconPosition:"leading",marketingServiceUrl:c}),j&&e.jsx(I,{appearance:"secondary",label:x??"",buttonLink:g,labelAttributes:T,openingMethod:y,parentComponentName:"article banner",modalId:m,buttonIcon:E,color:r==="black"?"inverse":"default",buttonIconVisible:B,buttonIconPosition:"leading",marketingServiceUrl:c})]})]})})})})})};export{Ie as ArticleBanner};
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.