import e from"react";import t from"classnames";import s from"../../IconButton/IconButton.js";import{NOOP as o}from"../../../utils/function-utils.js";import{getTestId as a}from"../../../tests/testIds.js";import{ComponentDefaultTestId as i}from"../../../tests/constants.js";import r from"../../Text/Text.js";import n from"../../Heading/Heading.js";import c from"../../Flex/Flex.js";import m from"./LegacyModalHeader.module.scss.js";import l from"../../../../components/icon/dist/Icon/Icon.js";import d from"../../../../packages/icons/dist/react/CloseSmall.js";var p=function(p){var f=p.title,u=p.children,j=p.titleClassName,x=p.description,N=void 0===x?"":x,g=p.descriptionClassName,v=p.icon,E=p.closeModal,y=void 0===E?o:E,L=p.iconSize,C=void 0===L?24:L,H=p.iconClassName,I=p.closeButtonAriaLabel,k=void 0===I?"close":I,B=p.id,M=p["data-testid"];return e.createElement("div",{className:t(m.container,p.className),"data-testid":M||a(i.MODAL_HEADER,B)},u||e.createElement(c,{align:"start",gap:"small",className:j},v&&e.createElement(l,{className:t(m.icon,H),icon:v,iconType:"svg",iconSize:C,ignoreFocusStyle:!0}),e.createElement(n,{id:B,maxLines:2},f)),N&&e.createElement(r,{type:"text2",maxLines:2,className:t(m.description,g)},N),e.createElement("div",{className:t(m.closeButton)},e.createElement(s,{key:"xxs",onClick:y,ariaLabel:k,icon:d,kind:"tertiary",size:"small"})))};Object.assign(p,{displayName:"ModalHeader"});export{p as default};
//# sourceMappingURL=LegacyModalHeader.js.map
