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