export interface WebformState {
    id: string;
    label: string;
    conditions?: WebformStateCondition;
}
export type BaseWebformStateCondition = {
    id: string;
    name: string;
};
type GenericCondition<T> = BaseWebformStateCondition & T;
type CommonOp = 'eq' | 'neq' | 'regex' | 'isnull' | 'notnull';
type ValueType = 'datasource' | 'hardCoded';
type DataType = 'string' | 'number' | 'date' | 'boolean' | 'array' | 'object' | 'duration';
export type DataSourceCondition = GenericCondition<{
    type: 'datasource';
    path: string;
    dsType: string;
    value: unknown;
    compareValue?: unknown;
    valueType?: ValueType;
    compareValueType?: ValueType;
    dataType?: DataType;
    compareDataType?: DataType;
    op: CommonOp | 'sw' | 'in' | 'nin' | 'gt' | 'gte' | 'lt' | 'lte' | 'isempty' | 'istrue' | 'isfalse' | 'between';
}>;
export type PrivilegeCondition = GenericCondition<{
    type: 'privilege';
    value: string;
    valueType?: ValueType;
    op: CommonOp | 'haspriv' | 'hasnopriv';
}>;
export type CombinationCondition = Omit<GenericCondition<{
    type: 'combination';
    op: 'and' | 'or';
    conditions: WebformStateCondition[];
}>, 'name'> & {
    name?: string;
};
export type CurrentStateCondition = GenericCondition<{
    type: 'currentState';
    value: unknown;
    compareValue?: unknown;
    valueType?: ValueType;
    compareValueType?: ValueType;
    dataType?: DataType;
    compareDataType?: DataType;
    op: CommonOp;
}>;
export type ParentStateCondition = GenericCondition<{
    type: 'parentState';
    value: unknown;
    compareValue?: unknown;
    valueType?: ValueType;
    compareValueType?: ValueType;
    dataType?: DataType;
    compareDataType?: DataType;
    op: CommonOp;
}>;
export type ReferenceCondition = GenericCondition<{
    type: 'reference';
    ref: string;
}>;
export type WebformStateCondition = DataSourceCondition | PrivilegeCondition | CombinationCondition | CurrentStateCondition | ParentStateCondition | ReferenceCondition;
export {};
