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