"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("tslib"),e=require("react/jsx-runtime"),i=require("../styles/ConfirmationModal.module.css.js");exports.default=function(n){var a=n.isOpen,l=n.title,t=n.description,o=n.warning,d=n.confirmText,r=void 0===d?"Confirm":d,c=n.cancelText,u=void 0===c?"Cancel":c,m=n.loadingText,f=void 0===m?"Processing...":m,_=n.onConfirm,g=n.onCancel,x=n.isLoading,v=void 0!==x&&x,j=n.confirmBgColor,h=void 0===j?"#EF4444":j,p=n.position,b=void 0===p?"absolute":p;return a?e.jsx("div",s.__assign({className:i.default.overlay,style:{position:b}},{children:e.jsxs("div",s.__assign({className:i.default.modal},{children:[e.jsx("button",s.__assign({onClick:g,className:i.default.closeBtn,style:{position:"absolute",right:"1rem",top:"1rem"},disabled:v},{children:"✕"})),e.jsxs("div",{children:[e.jsx("h2",s.__assign({className:i.default.title},{children:l})),e.jsx("div",s.__assign({className:i.default.description},{children:t})),o&&e.jsx("p",s.__assign({className:i.default.warning},{children:o})),e.jsxs("div",s.__assign({className:i.default.footer},{children:[e.jsx("button",s.__assign({onClick:g,className:i.default.cancelBtn,disabled:v},{children:u})),e.jsx("button",s.__assign({onClick:_,className:i.default.confirmBtn,style:{backgroundColor:h},disabled:v},{children:v?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:i.default.spinner}),f]}):r}))]}))]})]}))})):null};
//# sourceMappingURL=ConfirmationModal.js.map
