import { Block } from '../core/index.ts'; import type { BlockOutput, IBaseBlockConfig, IMutableNode, IRunContext } from '../types/index.ts'; /** * @public * * Configuration object for a condition block */ export interface IIfThenElseConditionConfig extends IBaseBlockConfig { /** * The result of this assertion decides which branch to take */ readonly assertion: Block | Block; /** * Execute this block if the predicate passes */ readonly then: Block; /** * Execute this block if the predicate fails */ readonly else: Block; } /** * @public * * Use in combination with an {@link Assertion} block to implement branching logic in your automations. * Supply two blocks and execute either one of them depending on the result of the assertion */ export declare class IfThenElseCondition extends Block { readonly config: IIfThenElseConditionConfig; name: string; type: string; constructor(config: IIfThenElseConditionConfig); addNext(node?: IMutableNode): void; run({ input, events, triggerId, hass, }: IRunContext): Promise>; } /** * @public * * Use in combination with an {@link assertion} block to implement branching logic in your automations. * Supply two blocks and execute either one of them depending on the result of the assertion */ export declare const when: (assertion: IIfThenElseConditionConfig["assertion"], config: Omit, "assertion" | "name">) => Block; //# sourceMappingURL=if-then-else-condition.d.ts.map