Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectField/Tabs/BasicInfo/SearchableContainer",["module","exports","require","@frontend-taglib-clay$clayui/alert","@frontend-taglib-clay$clayui/form","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../../../../utils/constants"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.SearchableContainer=function SearchableContainer({isApproved:a,objectField:t,readOnly:c,setValues:f}){const g=t.indexed&&("Clob"===t.DBType||"String"===t.DBType||"Attachment"===t.businessType)&&"Aggregation"!==t.businessType,s=(0,i.useMemo)((()=>t.indexedLanguageId&&e[t.indexedLanguageId]||u),[t.indexedLanguageId]);return i.default.createElement(l.Card,{title:Liferay.Language.get("searchable")},a&&i.default.createElement(n.default,{displayType:"info",title:"Info"},Liferay.Language.get("if-the-search-configuration-of-this-object-field-is-updated")),i.default.createElement(r.default.Group,null,i.default.createElement(l.Toggle,{disabled:"Encrypted"===t.businessType,label:Liferay.Language.get("searchable"),name:"indexed",onToggle:e=>f({indexed:e}),toggled:t.indexed})),g&&i.default.createElement(r.default.Group,null,i.default.createElement(r.ClayRadioGroup,{onChange:e=>{const a="true"===e,t=a?null:d.defaultLanguageId;f({indexedAsKeyword:a,indexedLanguageId:t})},value:new Boolean(t.indexedAsKeyword).toString()},i.default.createElement(r.ClayRadio,{disabled:c,label:Liferay.Language.get("keyword"),value:"true"}),i.default.createElement(r.ClayRadio,{disabled:c,label:Liferay.Language.get("text"),value:"false"}))),g&&!t.indexedAsKeyword&&i.default.createElement(l.SingleSelect,{label:Liferay.Language.get("language"),onChange:a=>{const[t]=Object.entries(e).find((([,e])=>a.label===e));f({indexedLanguageId:t})},options:o,required:!0,value:s}))};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(t("@frontend-taglib-clay$clayui/alert")),r=_interopRequireWildcard(t("@frontend-taglib-clay$clayui/form")),l=t("@liferay/object-js-components-web"),i=_interopRequireWildcard(t("liferay!frontend-js-react-web$react")),d=t("../../../../utils/constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=_getRequireWildcardCache();if(a&&a.has(e))return a.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(t,r,l):t[r]=e[r]}return t.default=e,a&&a.set(e,t),t}const e=Liferay.Language.available,o=Object.values(e).map((e=>({label:e}))),u=o[0].label}}));
//# sourceMappingURL=SearchableContainer.js.map