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