Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectView/ModalEditViewColumn/ModalEditViewColumn",["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","../objectViewContext"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.ModalEditViewColumn=function ModalEditViewColumn({editingObjectFieldName:e,observer:t,onClose:a}){const[{objectView:{objectViewColumns:c}},f]=(0,d.useViewContext)(),[b]=c.filter((t=>t.objectFieldName===e)),{label:y}=b,[s,p]=(0,o.useState)(y);return o.default.createElement(r.default,{observer:t},o.default.createElement(n.default,{onSubmit:t=>(t=>{t.preventDefault(),Object.entries(s).forEach((([e,t])=>{""===t&&e!==u.defaultLanguageId&&delete s[e]})),f({payload:{editingObjectFieldName:e,translations:s},type:d.TYPES.EDIT_OBJECT_VIEW_COLUMN_LABEL}),a()})(t)},o.default.createElement(r.default.Header,null,Liferay.Language.get("rename-column-label")),o.default.createElement(r.default.Body,null,o.default.createElement(i.Input,{disabled:!0,label:Liferay.Language.get("field-label"),name:e,value:b.fieldLabel}),o.default.createElement(i.InputLocalized,{id:"locale",label:Liferay.Language.get("column-label"),onChange:p,required:!0,translations:s})),o.default.createElement(r.default.Footer,{last:o.default.createElement(l.default.Group,{key:1,spaced:!0},o.default.createElement(l.default,{displayType:"secondary",onClick:()=>a()},Liferay.Language.get("cancel")),o.default.createElement(l.default,{displayType:"primary",type:"submit"},Liferay.Language.get("edit")))})))};var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/form")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/modal")),i=a("@liferay/object-js-components-web"),o=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=l?Object.getOwnPropertyDescriptor(e,n):null;r&&(r.get||r.set)?Object.defineProperty(a,n,r):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),u=a("../../../utils/constants"),d=a("../objectViewContext");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=ModalEditViewColumn.js.map