!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={4325:e=>{e.exports=require("@mui/icons-material/Close")},8619:e=>{e.exports=require("@mui/material")},3294:e=>{e.exports=require("formik")},9870:e=>{e.exports=require("i18n-react")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function o(r){var l=t[r];if(void 0!==l)return l.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.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:()=>g});var l=o(2015),n=o.n(l),a=o(9825),i=o.n(a),u=o(9870),s=o.n(u),c=o(3294),p=o(8619),d=o(4325),f=o.n(d);const m=({id:e,label:t,open:o,title:r,placeholder:a,onClose:i})=>{const u=`i-${e}-c-global-f-notes`,[d,m,g]=(0,c.useField)(u),[v,x]=(0,l.useState)((null==d?void 0:d.value)||"");(0,l.useEffect)((()=>{x((null==d?void 0:d.value)||"")}),[e,null==d?void 0:d.value]);return n().createElement(p.Dialog,{open:o,onClose:i,maxWidth:"sm",fullWidth:!0},n().createElement(p.DialogTitle,null,r||s().translate("general.notes")),n().createElement(p.IconButton,{"aria-label":"close",onClick:i,sx:e=>({position:"absolute",right:8,top:8,color:e.palette.grey[500]})},n().createElement(f(),null)),n().createElement(p.Divider,null),n().createElement(p.DialogContent,null,n().createElement(p.DialogContentText,null,t),n().createElement(p.TextField,{name:u,onChange:e=>x(e.target.value),value:v,margin:"normal",multiline:!0,fullWidth:!0,rows:4,placeholder:a||s().translate("placeholders.notes")})),n().createElement(p.DialogActions,null,n().createElement(p.Button,{onClick:()=>{g.setValue(v),i()},variant:"contained",fullWidth:!0},s().translate("general.save"))))};m.propTypes={id:i().any,label:i().string,title:i().string,placeholder:i().string,open:i().bool.isRequired,onClose:i().func.isRequired};const g=m;return r})()));
//# sourceMappingURL=notes-modal.js.map