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 m from"../../Flex/Flex.js";import c from"./LegacyModalHeader.module.scss.js";import l from"../../../../components/icon/dist/Icon/Icon.js";import d from"../../../../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,v=p.descriptionClassName,E=p.icon,g=p.closeModal,y=void 0===g?o:g,L=p.iconSize,C=void 0===L?24:L,H=p.iconClassName,I=p.closeButtonAriaLabel,B=void 0===I?"close":I,M=p.id,S=p["data-testid"];return e.createElement("div",{className:t(c.container,p.className),"data-testid":S||a(i.MODAL_HEADER,M)},u||e.createElement(m,{align:"start",gap:"small",className:j},E&&e.createElement(l,{className:t(c.icon,H),icon:E,iconType:"svg",iconSize:C,ignoreFocusStyle:!0}),e.createElement(n,{id:M,maxLines:2},f)),N&&e.createElement(r,{type:"text2",maxLines:2,className:t(c.description,v)},N),e.createElement("div",{className:t(c.closeButton)},e.createElement(s,{key:"xxs",onClick:y,ariaLabel:B,icon:d,kind:"tertiary",size:"small"})))};Object.assign(p,{displayName:"ModalHeader"});export{p as default};
//# sourceMappingURL=LegacyModalHeader.js.map
