!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")},6368:e=>{e.exports=require("@mui/material/Button")},1624:e=>{e.exports=require("@mui/material/Dialog")},8843:e=>{e.exports=require("@mui/material/DialogActions")},6809:e=>{e.exports=require("@mui/material/DialogContent")},8926:e=>{e.exports=require("@mui/material/DialogTitle")},3294:e=>{e.exports=require("formik")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};r.r(o),r.d(o,{default:()=>D});var n=r(2015),i=r.n(n),l=r(6842),a=r.n(l),u=r(9825),s=r.n(u),c=r(6368),p=r.n(c),m=r(1624),d=r.n(m),f=r(8843),x=r.n(f),v=r(6809),g=r.n(v);const b=require("@mui/material/DialogContentText");var y=r.n(b),q=r(8926),E=r.n(q),_=r(3294),h=r(8619),C=r(4325),j=r.n(C);const k=({item:e,open:t,onClose:r})=>{const o=`i-${null==e?void 0:e.form_item_id}-c-global-f-notes`,[l,u,s]=(0,_.useField)(o),[c,m]=(0,n.useState)("");(0,n.useEffect)((()=>{m(l.value||"")}),[null==l?void 0:l.value]);return i().createElement(d(),{open:t,onClose:r,maxWidth:"sm",fullWidth:!0},i().createElement(E(),null,a().translate("sponsor_edit_form.notes")),i().createElement(h.IconButton,{"aria-label":"close",onClick:r,sx:e=>({position:"absolute",right:8,top:8,color:e.palette.grey[500]})},i().createElement(j(),null)),i().createElement(h.Divider,null),i().createElement(g(),null,i().createElement(y(),null,null==e?void 0:e.name),i().createElement(h.TextField,{name:o,onChange:e=>m(e.target.value),value:c,margin:"normal",multiline:!0,fullWidth:!0,rows:4,placeholder:a().translate("sponsor_edit_form.notes_placeholder")})),i().createElement(x(),null,i().createElement(p(),{onClick:()=>{s.setValue(c),r()},variant:"contained",fullWidth:!0},a().translate("general.save"))))};k.propTypes={item:s().object,open:s().bool.isRequired,onClose:s().func.isRequired};const D=k;return o})()));
//# sourceMappingURL=notes-modal.js.map