export var FormSectionLayout;
(function (FormSectionLayout) {
    FormSectionLayout["TABS"] = "TABS";
})(FormSectionLayout || (FormSectionLayout = {}));
export const isFormItem = (item) => {
    return item.rowItems === undefined;
};
export const isDropdownFormItem = (item) => {
    return isFormItem(item) && item.componentType === FormComponentType.DROPDOWN;
};
export const getRowItemsFromSectionItem = (sectionItem) => {
    const isRow = !isFormItem(sectionItem);
    const rowItems = isRow ? sectionItem.rowItems : [sectionItem];
    return rowItems;
};
export var FormComponentType;
(function (FormComponentType) {
    FormComponentType["ALERT"] = "ALERT";
    FormComponentType["INPUT_TEXT"] = "INPUT_TEXT";
    FormComponentType["INPUT_AREA"] = "INPUT_AREA";
    FormComponentType["DYNAMIC_INPUT_TEXT"] = "DYNAMIC_INPUT_TEXT";
    FormComponentType["CODE_EDITOR"] = "CODE_EDITOR";
    FormComponentType["FIELD_LIST"] = "FIELD_LIST";
    FormComponentType["FIELD_LIST_FORM"] = "FIELD_LIST_FORM";
    FormComponentType["DYNAMIC_FIELD_LIST"] = "DYNAMIC_FIELD_LIST";
    FormComponentType["DROPDOWN"] = "DROPDOWN";
    FormComponentType["DYNAMIC_DROPDOWN"] = "DYNAMIC_DROPDOWN";
    FormComponentType["METADATA_DROPDOWN"] = "METADATA_DROPDOWN";
    FormComponentType["CHECKBOX"] = "CHECKBOX";
    FormComponentType["SWITCH"] = "SWITCH";
    FormComponentType["RADIO"] = "RADIO";
    FormComponentType["PRIMARY_KEY_DISPLAY"] = "PRIMARY_KEY_DISPLAY";
    FormComponentType["KEY_MAPPING"] = "KEY_MAPPING";
    FormComponentType["FILTER_COLUMNS"] = "FILTER_COLUMNS";
    FormComponentType["SQL_PREVIEW"] = "SQL_PREVIEW";
    FormComponentType["SQL_PREVIEW_WITH_INSERT_DELETE"] = "SQL_PREVIEW_WITH_INSERT_DELETE";
    // for openAPI
    FormComponentType["OPENAPI_ACTION_DROPDOWN"] = "OPENAPI_ACTION_DROPDOWN";
    // enable the dynamic text to autocomplete with a set of options from metadata
    FormComponentType["DYNAMIC_INPUT_WITH_METADATA_OPTIONS"] = "DYNAMIC_INPUT_WITH_METADATA_OPTIONS";
    // combines base url and relative path
    FormComponentType["URL_INPUT_TEXT"] = "URL_INPUT_TEXT";
    FormComponentType["BUTTON"] = "BUTTON";
    FormComponentType["ONEOF_ACTION_DROPDOWN"] = "ONEOF_ACTION_DROPDOWN";
    FormComponentType["COPY_BOX"] = "COPY_BOX";
})(FormComponentType || (FormComponentType = {}));
export var DisplayUnsupportedState;
(function (DisplayUnsupportedState) {
    // TODO(taha) We can potentially add mixed states
    // for when incompatibilty occurs due to a not yet
    // supported field vs a deprecated field
    DisplayUnsupportedState["HIDE"] = "hide";
    DisplayUnsupportedState["DISABLE"] = "disable";
})(DisplayUnsupportedState || (DisplayUnsupportedState = {}));
export var TooltipIconType;
(function (TooltipIconType) {
    TooltipIconType["WARNING"] = "warning";
    TooltipIconType["INFO"] = "info";
})(TooltipIconType || (TooltipIconType = {}));
export var FormItemTransformation;
(function (FormItemTransformation) {
    FormItemTransformation["BYTE_ARRAY"] = "BYTE_ARRAY";
})(FormItemTransformation || (FormItemTransformation = {}));
export var InputDataType;
(function (InputDataType) {
    InputDataType["NUMBER"] = "NUMBER";
    InputDataType["PASSWORD"] = "PASSWORD";
})(InputDataType || (InputDataType = {}));
export var EditorLanguage;
(function (EditorLanguage) {
    EditorLanguage["TEXT"] = "TEXT";
    EditorLanguage["SQL"] = "SQL";
    EditorLanguage["JSON"] = "JSON";
    EditorLanguage["JAVASCRIPT"] = "JAVASCRIPT";
    EditorLanguage["PYTHON"] = "PYTHON";
})(EditorLanguage || (EditorLanguage = {}));
//# sourceMappingURL=form.js.map