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