!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={4574:(e,t,o)=>{o.d(t,{default:()=>m});var n=o(2015),r=o.n(n),i=o(9825),c=o.n(i),a=o(8619),l=o(5814);const u={warning:r().createElement(l.Warning,{color:"warning"}),success:r().createElement(l.CheckCircle,{color:"success"}),error:r().createElement(l.Error,{color:"error"}),info:r().createElement(l.Info,{color:"info"})},p=({open:e,title:t,text:o,iconType:n="",onConfirm:i,onCancel:c,confirmButtonText:l="Confirm",confirmButtonColor:p="primary",cancelButtonText:m="Cancel",cancelButtonColor:s="primary"})=>r().createElement(a.Dialog,{open:e,onClose:c},r().createElement(a.DialogTitle,{sx:{p:2},component:"div"},r().createElement(a.Typography,{variant:"h5"},t)),r().createElement(a.Divider,null),r().createElement(a.DialogContent,{sx:{p:2}},r().createElement("div",{style:{display:"flex",alignItems:"center"}},u[n]&&r().createElement("div",{style:{marginRight:10}},u[n]),r().createElement(a.Typography,{variant:"body1"},o))),r().createElement(a.Divider,{sx:{margin:"10px 0px 10px 0px"}}),r().createElement(a.DialogActions,null,r().createElement(a.Button,{fullWidth:!0,onClick:c,color:s,variant:"outlined",sx:{whiteSpace:"nowrap",minWidth:100}},m),r().createElement(a.Button,{fullWidth:!0,onClick:i,color:p,variant:"contained",sx:{whiteSpace:"nowrap",minWidth:100}},l)));p.propTypes={open:c().bool,title:c().string.isRequired,text:c().string.isRequired,iconType:c().string,onConfirm:c().func.isRequired,onCancel:c().func.isRequired,confirmButtonText:c().string,confirmButtonColor:c().string,cancelButtonText:c().string,cancelButtonColor:c().string},p.defaultProps={open:!1,iconType:"warning",confirmButtonText:"Confirm",confirmButtonColor:"primary",cancelButtonText:"Cancel",cancelButtonColor:"default"};const m=p},5814:e=>{e.exports=require("@mui/icons-material")},8619:e=>{e.exports=require("@mui/material")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};o.r(n),o.d(n,{default:()=>u});const r=require("react-dom");var i=o.n(r),c=o(2015),a=o.n(c),l=o(4574);const u=({title:e,text:t,iconType:o="",confirmButtonText:n="Confirm",cancelButtonText:r="Cancel",confirmButtonColor:c="primary",cancelButtonColor:u="primary"})=>new Promise((p=>{const m=document.createElement("div");document.body.appendChild(m);const s=e=>{i().unmountComponentAtNode(m),m.remove(),p(e)};i().render(a().createElement(l.default,{open:!0,title:e,text:t,iconType:o,confirmButtonText:n,cancelButtonText:r,confirmButtonColor:c,cancelButtonColor:u,onConfirm:()=>s(!0),onCancel:()=>s(!1)}),m)}));return n})()));
//# sourceMappingURL=show-confirm-dialog.js.map