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