import{__rest as o,__assign as s}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as i}from"react/jsx-runtime";import n from"classnames";import{noop as c}from"lodash";import{Modal as e}from"@material-ui/core";import{CloseSmallIcon as a}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import{isMobileDetected as m,isNativeDetected as r}from"../../utils/mobileDetect.js";import l from"../IconButton/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import{CLASSNAMES as d}from"../../constants/classNames.js";import p from"./CorvaModal.css.js";var j={filters:"Filters",settings:"Settings"};function u(u){var C,I=u.actions,N=u.actionsClassName,h=u.children,f=u.contentClassName,v=u.contentContainerClassName,b=u.isCloseIconHidden,M=void 0!==b&&b,k=u.isMobile,F=void 0===k?m:k,g=u.isNative,x=void 0===g?r:g,A=u.modalTitleClassName,R=u.closeIconClassName,y=u.onClose,z=void 0===y?c:y,E=u.open,O=u.rootClassName,P=u.size,S=u.stickyFooterClassName,T=u.title,q=u.type,B=u.contentRef,D=u["data-testid"],G=void 0===D?"CorvaModal":D,H=o(u,["actions","actionsClassName","children","contentClassName","contentContainerClassName","isCloseIconHidden","isMobile","isNative","modalTitleClassName","closeIconClassName","onClose","open","rootClassName","size","stickyFooterClassName","title","type","contentRef","data-testid"]),W=x||F,_=T||j[q];return t(e,s({open:E,onClose:z,className:n(!W&&"c-modal",p.modalWrapper,O,d.modal)},H,{children:i("div",{className:n((C={},C[p.modalContainer]=!0,C[p.modalContainerMobile]=W,C[p[P]]=!0,C[v]=!0,C)),children:[_&&i("div",{className:n(p.title,W&&p.titleMobile,A),children:[t("div",{className:n(p.titleText),children:_}),(!M||q)&&t(l,{className:R,tooltipProps:{title:"Close"},onClick:z,"data-testid":"".concat(G,"_closeButton"),children:t(a,{size:24})})]}),h&&t("div",{ref:B,className:n(p.modalContent,W&&p.modalContentMobile,f),children:h}),I&&t("div",{className:n(p.modalActions,W&&p.modalActionsMobile,S,N),children:I})]})}))}export{u as CorvaModal};
