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