import {ReactNode} from "react"; import {FieldsProps} from "../Fields"; import {RowOptions} from "./cards/Fields/RowOptions"; export enum FieldType { Tab = 'tab', MultiSelect = 'multi-select', Select = "select", Number = 'number', None = 'none', Button = 'button', BooleanButton = 'boolean-button', BooleanTab = 'boolean-tab', DualBooleanTab = 'dual-boolean-tab', Custom = "custom", Text = 'text', MultiLineText = 'multi-line-text', Date = 'date', Time = 'time', Columns = 'row', Grid = 'grid', } export type FieldItem
= {
id: string,
title?: string,
description?: string,
renderType: FieldType | ((options: Options) => FieldType | false) | false,
columns?: FieldRow // when field type is columns
fieldProps?: P | ((options: Options, onUpdate: FieldsProps['onUpdate'], state: Record