Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/Layout/LayoutScreen/ModalAddObjectLayoutBox",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/modal","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../../../utils/constants","../objectLayoutContext"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalAddObjectLayoutBox=function ModalAddObjectLayoutBox({observer:e,onClose:t,tabIndex:a}){const[,c]=(0,i.useLayoutContext)(),{errors:f,handleChange:y,handleSubmit:b,values:s}=(0,u.useForm)({initialValues:{name:""},onSubmit:e=>{c({payload:{name:{[d.defaultLanguageId]:e.name},tabIndex:a,type:"regular"},type:i.TYPES.ADD_OBJECT_LAYOUT_BOX}),t()},validate:e=>{const t={};return e.name||(t.name=u.REQUIRED_MSG),t}});return r.default.createElement(o.default,{observer:e},r.default.createElement(l.default,{onSubmit:b},r.default.createElement(o.default.Header,null,Liferay.Language.get("add-block")),r.default.createElement(o.default.Body,null,r.default.createElement(u.Input,{error:f.name,id:"inputName",label:Liferay.Language.get("label"),name:"name",onChange:y,required:!0,value:s.name})),r.default.createElement(o.default.Footer,{last:r.default.createElement(n.default.Group,{spaced:!0},r.default.createElement(n.default,{displayType:"secondary",onClick:t},Liferay.Language.get("cancel")),r.default.createElement(n.default,{type:"submit"},Liferay.Language.get("save")))})))};var n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/form")),o=_interopRequireDefault(a("@frontend-taglib-clay$clayui/modal")),u=a("@liferay/object-js-components-web"),r=_interopRequireDefault(a("liferay!frontend-js-react-web$react")),d=a("../../../utils/constants"),i=a("../objectLayoutContext");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=ModalAddObjectLayoutBox.js.map