import{r as n}from"./index-NdkWRN8K.js";import{M as R}from"./Button-BEA5U6Tg.js";import{M as S}from"./FullScreenOverlay-BTMDlJhE.js";import{V as k,W as z,c as A,_ as E,s as U,b as h,d as w,f as B,r as N,K as P,av as _}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{u as D}from"./useUniqueId-Bsgqe1tm.js";import{j as o}from"./jsx-runtime-CnH95YSl.js";import{T as q}from"./Typography-ClQ35Rr-.js";import{a as L,b as H,c as W}from"./DialogContent-Cwn-I-C_.js";import{D as K}from"./DialogTitle-C-K7jEio.js";function V(t){return k("MuiDialogContentText",t)}z("MuiDialogContentText",["root"]);const $=["children","className"],G=t=>{const{classes:s}=t,a=B({root:["root"]},V,s);return h({},s,a)},J=U(q,{shouldForwardProp:t=>N(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,s)=>s.root})({}),Q=n.forwardRef(function(s,r){const a=A({props:s,name:"MuiDialogContentText"}),{className:m}=a,i=E(a,$),l=G(i);return o.jsx(J,h({component:"p",variant:"body1",color:"text.secondary",ref:r,ownerState:i,className:w(l.root,m)},a,{classes:l}))}),X=({primaryCallToActionComponent:t,secondaryCallToActionComponent:s,tertiaryCallToActionComponent:r,callToActionFirstComponent:a,callToActionSecondComponent:m,callToActionLastComponent:i,children:l,isOpen:d,onClose:u,testId:y,title:j,translate:T})=>{const{t:b}=P(),[g,M]=n.useState(!1),x=n.useRef(null),I=D(),f=D();n.useEffect(()=>{let e;const c=()=>{const p=x.current;p&&(cancelAnimationFrame(e),M(p.scrollHeight>p.clientHeight)),e=requestAnimationFrame(c)};return d&&(e=requestAnimationFrame(c)),()=>{cancelAnimationFrame(e)}},[d]);const v=typeof l=="string"?o.jsx(Q,{children:l}):l,C=[r||i,s||m,t||a].filter(Boolean),F=n.useCallback(e=>u(e,"closeButtonClick"),[u]);return o.jsx(S,{children:o.jsxs(L,{"aria-labelledby":f,"data-se":y,onClose:u,open:d,children:[o.jsxs(K,{id:I,translate:T,children:[o.jsx("span",{id:f,children:j}),o.jsx(R,{ariaLabel:b("close.text"),onClick:F,size:"small",startIcon:o.jsx(_,{}),variant:"floating"})]}),o.jsx(H,{...g&&{tabIndex:0},dividers:g,ref:x,children:v}),C.length>0&&o.jsx(W,{children:C.map((e,c)=>e?n.cloneElement(e,{key:c}):null)})]})})},Y=n.memo(X);Y.displayName="Dialog";export{Q as D,Y as M};
