!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={8177:e=>{e.exports=require("@mui/icons-material/CheckCircle")},1519:e=>{e.exports=require("@mui/icons-material/Error")},8619:e=>{e.exports=require("@mui/material")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](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 r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{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 r={};o.r(r),o.d(r,{default:()=>C});var n=o(2015),i=o.n(n),a=o(9825),c=o.n(a),l=o(8619),u=o(8177),s=o.n(u),p=o(1519),m=o.n(p);const d=require("@mui/icons-material/Info");var f=o.n(d);const x=require("@mui/icons-material/Warning");var y=o.n(x);const g={warning:i().createElement(y(),{color:"warning"}),success:i().createElement(s(),{color:"success"}),error:i().createElement(m(),{color:"error"}),info:i().createElement(f(),{color:"info"})},v=({open:e,title:t,text:o,iconType:r="",onConfirm:n,onCancel:a,confirmButtonText:c="Confirm",confirmButtonColor:u="primary",cancelButtonText:s="Cancel",cancelButtonColor:p="primary"})=>i().createElement(l.Dialog,{open:e,onClose:a},i().createElement(l.DialogTitle,{sx:{p:2},component:"div"},i().createElement(l.Typography,{variant:"h5"},t)),i().createElement(l.Divider,null),i().createElement(l.DialogContent,{sx:{p:2}},i().createElement("div",{style:{display:"flex",alignItems:"center"}},g[r]&&i().createElement("div",{style:{marginRight:10}},g[r]),i().createElement(l.Typography,{variant:"body1"},o))),i().createElement(l.Divider,{sx:{margin:"10px 0px 10px 0px"}}),i().createElement(l.DialogActions,null,i().createElement(l.Button,{fullWidth:!0,onClick:a,color:p,variant:"outlined",sx:{whiteSpace:"nowrap",minWidth:100}},s),i().createElement(l.Button,{fullWidth:!0,onClick:n,color:u,variant:"contained",sx:{whiteSpace:"nowrap",minWidth:100}},c)));v.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},v.defaultProps={open:!1,iconType:"warning",confirmButtonText:"Confirm",confirmButtonColor:"primary",cancelButtonText:"Cancel",cancelButtonColor:"default"};const C=v;return r})()));
//# sourceMappingURL=confirm-dialog.js.map