try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`88bf6ac2-8f5c-4bf4-b0a6-17d808fa7ab9`,e._sentryDebugIdIdentifier=`sentry-dbid-88bf6ac2-8f5c-4bf4-b0a6-17d808fa7ab9`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Gi as n,Hm as r,ai as i,jg as a,ng as o,pi as s,xi as c,yr as l}from"./entry.client-mpghtlrl.js";import{ht as u}from"./xds-react-components-ihgca01z.js";import{r as d}from"./background-image-nmq0yffm.js";var f=e(a(),1),p=t(),m=e(s(),1),h=o(),g=e=>{let t=(0,p.c)(2),{backgroundImage:n}=e,r;return t[0]===n?r=t[1]:(r=n&&n.source&&(0,h.jsxs)(`div`,{className:`absolute inset-0 z-0 overflow-hidden`,children:[n.dim&&(0,h.jsx)(`div`,{style:{background:`var(--V2HF)`},className:`linear h-full w-full`}),(0,h.jsx)(d,{className:(0,m.default)(`min-h-[max-content] min-w-[max-content] object-cover object-center`,n.dim&&`opacity-35`),src:n.source.URL,alt:`${n.source?.Caption} background`,aspectRatio:`16:9`,constraintSet:n.constraintSet,getResizedImageUrl:_})]}),t[0]=n,t[1]=r),r};function _(e){return e}var v=({className:e})=>(0,h.jsx)(i,{children:(0,h.jsx)(c,{className:(0,m.default)(`h-items-info-container-height-height w-full`,e)})}),y=e=>{let t=(0,p.c)(40),{backgroundImage:i,children:a,containerClassName:o,footer:s,shrinkToContent:c,href:d,isDisabled:_,isLoading:y,isError:b,onPress:x,showFooter:S,title:C}=e,w=c===void 0?!1:c,T=S===void 0?`auto`:S,[E,D]=(0,f.useState)(!1),O=(0,f.useRef)(null),k=(0,f.useRef)(null),{locSomethingWentWrong:A,locGenericErrorSubheading:j,locViewMore:M}=r(),N;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{!O?.current||!k?.current||D(Math.max(O?.current?.clientHeight??0,O?.current?.scrollHeight??0)<Math.max(k?.current?.clientHeight??0,k?.current?.scrollHeight??0))},t[0]=N):N=t[0];let P=N,F;t[1]===T?F=t[2]:(F=()=>{if(T===`always`){D(!0);return}else if(T===`never`){D(!1);return}else return!O?.current||!k?.current?void 0:(P(),window.addEventListener(`resize`,P),window.addEventListener(`orientationchange`,P),()=>{window.removeEventListener(`resize`,P),window.removeEventListener(`orientationchange`,P)})},t[1]=T,t[2]=F);let I;if(t[3]===T?I=t[4]:(I=[T,O?.current,k?.current],t[3]=T,t[4]=I),n(F,I),y){let e;return t[5]===o?e=t[6]:(e=(0,h.jsx)(v,{className:o}),t[5]=o,t[6]=e),e}let L=d?`a`:`button`,R=!w,z;t[7]!==w||t[8]!==R||t[9]!==_||t[10]!==o?(z=(0,m.default)({"max-h-items-info-container-height-height":w,"h-items-info-container-height-height":R},`flex w-full flex-col rounded-component-item-standard-regular text-start`,_&&`pointer-events-none`,o),t[7]=w,t[8]=R,t[9]=_,t[10]=o,t[11]=z):z=t[11];let B=d?`_blank`:void 0,V=_||b,H;t[12]===i?H=t[13]:(H=(0,h.jsx)(g,{backgroundImage:i}),t[12]=i,t[13]=H);let U;t[14]===E?U=t[15]:(U=E?{maskImage:`linear-gradient(to bottom, black calc(100% - 50px), transparent 100%)`,WebkitMaskImage:`linear-gradient(to bottom, black calc(100% - 50px), transparent 100%)`}:void 0,t[14]=E,t[15]=U);let W;t[16]!==b||t[17]!==A||t[18]!==j||t[19]!==C||t[20]!==a?(W=b?(0,h.jsx)(l,{illustration:`error`,title:A(),subtitle:j()}):(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col gap-8 text-ellipsis text-wrap p-internal-container-padding-borderless-regular`,ref:k,children:[C&&(0,h.jsx)(`h5`,{className:`text-noninteractive-content-primary-content type-title3`,children:C}),a]}),t[16]=b,t[17]=A,t[18]=j,t[19]=C,t[20]=a,t[21]=W):W=t[21];let G;t[22]!==U||t[23]!==W?(G=(0,h.jsx)(`div`,{className:`relative z-10 w-full flex-1 overflow-hidden`,style:U,children:W}),t[22]=U,t[23]=W,t[24]=G):G=t[24];let K;t[25]!==E||t[26]!==b||t[27]!==s||t[28]!==M?(K=E&&!b&&(0,h.jsx)(`div`,{className:`z-10 flex flex-col items-start justify-center gap-layout-vertical-group-of-items-regular self-stretch rounded-b-regular p-internal-container-padding-borderless-regular`,children:(0,h.jsx)(`p`,{className:`text-item-visible-container-default-content-primary-rest type-cta`,children:s??M()})}),t[25]=E,t[26]=b,t[27]=s,t[28]=M,t[29]=K):K=t[29];let q;return t[30]!==L||t[31]!==z||t[32]!==d||t[33]!==x||t[34]!==B||t[35]!==V||t[36]!==H||t[37]!==G||t[38]!==K?(q=(0,h.jsxs)(u,{as:L,className:z,href:d,onPress:x,ref:O,target:B,isDisabled:V,children:[H,G,K]}),t[30]=L,t[31]=z,t[32]=d,t[33]=x,t[34]=B,t[35]=V,t[36]=H,t[37]=G,t[38]=K,t[39]=q):q=t[39],q};export{v as n,y as t};