"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"),t=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");var c=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,N=o.contentContainerClassName,p=o.isCloseIconHidden,v=void 0!==p&&p,_=o.isMobile,f=void 0===_?c.isMobileDetected:_,h=o.isNative,b=void 0===h?c.isNativeDetected:h,x=o.modalTitleClassName,g=o.closeIconClassName,M=o.onClose,k=void 0===M?i.noop:M,F=o.open,S=o.rootClassName,y=o.size,A=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=b||f,B=R||m[D];return e.jsx(n.Modal,s.__assign({open:F,onClose:k,className:d.default(!T&&"c-modal",l.modalWrapper,S,a.CLASSNAMES.modal)},z,{children:e.jsxs("div",s.__assign({className:d.default((u={},u[l.modalContainer]=!0,u[l.modalContainerMobile]=T,u[l[y]]=!0,u[N]=!0,u))},{children:[B&&e.jsxs("div",s.__assign({className:d.default(l.title,T&&l.titleMobile,x)},{children:[e.jsx("div",s.__assign({className:d.default(l.titleText)},{children:B})),(!v||D)&&e.jsx(r,s.__assign({className:g,tooltipProps:{title:"Close"},onClick:k,"data-testid":"".concat(P,"_closeButton")},{children:e.jsx(t.CloseSmallIcon,{size:24})}))]})),C&&e.jsx("div",s.__assign({ref:E,className:d.default(l.modalContent,T&&l.modalContentMobile,I)},{children:C})),j&&e.jsx("div",s.__assign({className:d.default(l.modalActions,T&&l.modalActionsMobile,A,q)},{children:j}))]}))}))};
