Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectField/Tabs/BasicInfo/BasicInfo",["module","exports","require","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../../../../utils/fieldSettings","../../ObjectFieldFormBase","./AggregationFilterContainer","./AttachmentProperties","./FormulaContainer","./MaxLengthProperties","./SearchableContainer","./TranslationOptionsContainer"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicInfo=function BasicInfo({errors:e,filterOperators:t,handleChange:a,isApproved:g,isDefaultStorageType:b,objectDefinitionExternalReferenceCode:p,objectFieldTypes:y,objectName:j,objectRelationshipId:F,readOnly:m,setValues:C,values:h,workflowStatusJSONArray:S}){const[L,O]=(0,r.useState)({enableLocalization:!1}),[E,T]=(0,r.useState)(),[w,v]=(0,r.useState)([]),[A,P]=(0,r.useState)(),R=!!(g||h.system||h.relationshipType),handleSettingsChange=({name:e,value:t})=>C({objectFieldSettings:(0,i.updateFieldSettings)(h.objectFieldSettings,{name:e,value:t})});return(0,r.useEffect)((()=>{(async()=>{const e=await n.API.getObjectDefinitionByExternalReferenceCode(p);O(e)})()}),[p]),r.default.createElement(r.default.Fragment,null,r.default.createElement(n.Card,{title:Liferay.Language.get("basic-info")},r.default.createElement(n.InputLocalized,{disableFlag:m,disabled:m,error:e.label,label:Liferay.Language.get("label"),onChange:e=>C({label:e}),required:!0,translations:h.label}),r.default.createElement(o.default,{creationLanguageId2:A,disabled:R,editingField:!0,errors:e,handleChange:a,objectDefinitionExternalReferenceCode:p,objectField:h,objectFieldTypes:y,objectName:j,objectRelationshipId:F,onAggregationFilterChange:v,onRelationshipChange:T,setValues:C},"Attachment"===h.businessType&&r.default.createElement(s.AttachmentProperties,{errors:e,objectFieldSettings:h.objectFieldSettings,onSettingsChange:handleSettingsChange}),("Encrypted"===h.businessType||"LongText"===h.businessType||"Text"===h.businessType)&&r.default.createElement(u.MaxLengthProperties,{disabled:h.system,errors:e,objectField:h,objectFieldSettings:h.objectFieldSettings,onSettingsChange:handleSettingsChange,setValues:C}))),"Aggregation"===h.businessType&&p!==E&&r.default.createElement(l.AggregationFilterContainer,{aggregationFilters:w,creationLanguageId2:A,filterOperators:t,objectDefinitionExternalReferenceCode2:E,setAggregationFilters:v,setCreationLanguageId2:P,setValues:C,values:h,workflowStatusJSONArray:S}),"Formula"===h.businessType&&r.default.createElement(c.FormulaContainer,{errors:e,objectFieldSettings:h.objectFieldSettings,setValues:C}),"Blob"!==h.DBType&&"Formula"!==h.businessType&&r.default.createElement(d.SearchableContainer,{errors:e,isApproved:g,objectField:h,readOnly:m,setValues:C}),Liferay.FeatureFlags["LPS-172017"]&&r.default.createElement(f.TranslationOptionsContainer,{objectDefinition:L,published:g,setValues:C,values:h}),Liferay.FeatureFlags["LPS-135430"]&&!b&&r.default.createElement(n.Card,{title:Liferay.Language.get("external-data-source")},r.default.createElement(n.Input,{label:Liferay.Language.get("external-reference-code"),name:"externalReferenceCode",onChange:a,value:h.externalReferenceCode})))};var n=a("@liferay/object-js-components-web"),r=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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),i=a("../../../../utils/fieldSettings"),o=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("../../ObjectFieldFormBase")),l=a("./AggregationFilterContainer"),s=a("./AttachmentProperties"),c=a("./FormulaContainer"),u=a("./MaxLengthProperties"),d=a("./SearchableContainer"),f=a("./TranslationOptionsContainer");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}}}));
//# sourceMappingURL=BasicInfo.js.map