Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectField/Tabs/Advanced/ReadOnlyContainer",["module","exports","require","@frontend-taglib-clay$clayui/form","@liferay/object-js-components-web","liferay!frontend-js-react-web$react"],(function(e,a,n){window;Object.defineProperty(a,"__esModule",{value:!0}),a.ReadOnlyContainer=function ReadOnlyContainer({disabled:e,readOnlySidebarElements:a,requiredField:n,setValues:i,values:o}){var d;const setReadOnly=e=>{i({readOnly:e,required:"true"!==e&&"conditional"!==e&&n})};return t.default.createElement(t.default.Fragment,null,o.readOnly&&t.default.createElement(r.Card,{disabled:e,title:Liferay.Language.get("read-only")},t.default.createElement(l.ClayRadioGroup,{defaultValue:null==o?void 0:o.readOnly},t.default.createElement(l.ClayRadio,{disabled:e,label:Liferay.Language.get("true"),onClick:()=>setReadOnly("true"),value:"true"}),t.default.createElement(l.ClayRadio,{disabled:e,label:Liferay.Language.get("false"),onClick:()=>setReadOnly("false"),value:"false"}),t.default.createElement(l.ClayRadio,{disabled:e,label:Liferay.Language.get("conditional"),onClick:()=>setReadOnly("conditional"),value:"conditional"})),"conditional"===o.readOnly&&t.default.createElement(r.ExpressionBuilder,{feedbackMessage:Liferay.Language.get("use-expressions-to-create-a-condition"),label:Liferay.Language.get("expression-builder"),onChange:({target:{value:e}})=>{i({readOnlyConditionExpression:e})},onOpenModal:()=>{var e;Liferay.Util.getOpener().Liferay.fire("openExpressionBuilderModal",{eventSidebarElements:a,header:Liferay.Language.get("expression-builder"),onSave:e=>{i({readOnlyConditionExpression:e})},placeholder:"<#-- ".concat(Liferay.Language.get("create-the-condition-of-the-read-only-state-using-expression-builder")," --\x3e"),required:!1,source:null!==(e=o.readOnlyConditionExpression)&&void 0!==e?e:"",validateExpressionURL:""})},placeholder:Liferay.Language.get("create-an-expression"),value:null!==(d=o.readOnlyConditionExpression)&&void 0!==d?d:""})))};var l=n("@frontend-taglib-clay$clayui/form"),r=n("@liferay/object-js-components-web"),t=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n("liferay!frontend-js-react-web$react"))}));
//# sourceMappingURL=ReadOnlyContainer.js.map