Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/Layout/LayoutScreen/ObjectLayoutField",["module","exports","require","@frontend-taglib-clay$clayui/label","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../objectLayoutContext","./HeaderDropdown"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectLayoutField=function ObjectLayoutField({boxIndex:e,columnIndex:t,objectFieldName:a,rowIndex:i,tabIndex:u}){const[{creationLanguageId:c,objectFieldTypes:s,objectFields:y},f]=(0,d.useLayoutContext)(),b=y.find((({name:e})=>e===a)),m=s.find((({businessType:e})=>e===b.businessType));return o.default.createElement(o.default.Fragment,null,o.default.createElement(n.Panel,{key:"field_".concat(a)},o.default.createElement(n.PanelSimpleBody,{contentRight:o.default.createElement(r.HeaderDropdown,{deleteElement:()=>{f({payload:{boxIndex:e,columnIndex:t,objectFieldName:a,rowIndex:i,tabIndex:u},type:d.TYPES.DELETE_OBJECT_LAYOUT_FIELD})}}),title:(0,n.getLocalizableLabel)(c,b.label,b.name)},o.default.createElement("small",{className:"text-secondary"},null==m?void 0:m.label," |"," "),o.default.createElement(l.default,{className:"label-inside-custom-select",displayType:(null==b?void 0:b.required)?"warning":"success"},(null==b?void 0:b.required)?Liferay.Language.get("mandatory"):Liferay.Language.get("optional")),Liferay.FeatureFlags["LPS-170122"]&&("true"===b.readOnly||"conditional"===b.readOnly)&&o.default.createElement(l.default,{className:"label-inside-custom-select",displayType:"secondary"},Liferay.Language.get("read-only")))))};var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/label")),n=a("@liferay/object-js-components-web"),o=_interopRequireDefault(a("liferay!frontend-js-react-web$react")),d=a("../objectLayoutContext"),r=a("./HeaderDropdown");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=ObjectLayoutField.js.map