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';
type ValueType = 'datasource' | 'hardCoded';
type DataType = 'string' | 'number' | 'date' | 'boolean' | 'array' | 'object';
export type DataSourceCondition = GenericCondition<{
    type: 'datasource';
    path: string;
    value: unknown;
    valueType?: ValueType;
    dataType?: DataType;
    op: CommonOp | 'in' | 'nin' | 'gt' | 'gte' | 'lt' | 'lte';
}>;
export type PrivilegeCondition = GenericCondition<{
    type: 'privilege';
    value: string;
    valueType?: ValueType;
    op: CommonOp;
}>;
export type CombinationCondition = Omit<GenericCondition<{
    type: 'combination';
    op: 'and' | 'or';
    conditions: WebformStateCondition[];
}>, 'name'> & {
    name?: string;
};
export type CurrentStateCondition = GenericCondition<{
    type: 'currentState';
    value: string;
    valueType?: ValueType;
    dataType?: DataType;
    op: CommonOp;
}>;
export type ParentStateCondition = GenericCondition<{
    type: 'parentState';
    value: string;
    valueType?: ValueType;
    dataType?: DataType;
    op: CommonOp;
}>;
export type ReferenceCondition = Omit<GenericCondition<{
    type: 'reference';
    ref: string;
}>, 'name'>;
export type WebformStateCondition = DataSourceCondition | PrivilegeCondition | CombinationCondition | CurrentStateCondition | ParentStateCondition | ReferenceCondition;
export {};
