import type { Scope } from "intentx-state-z"; import { LogicRuntime, type ActionFactory } from "../core/runtime"; import type { EffectDef } from "../core/effect"; import type { ComputedDef, InferComputed } from "../core"; import type { LogicFactory } from "./types"; type IntentHandler, P = any> = (context: { payload: P; state: () => Readonly>; setState: (recipe: (draft: S) => void) => void; scope: Scope; signal: AbortSignal; }) => void | Promise; type IntentRegistry> = { on:

(type: string, handler: IntentHandler) => void; effect:

(type: string, eff: EffectDef) => void; }; type InferActions>> = { [K in keyof A]: ReturnType; }; type LogicConfig, A extends Record>> = { name?: string; state: S; computed?: C; intents: Array<(bus: IntentRegistry) => void>; actions: A; }; export declare class LogicFluentBuilder = Record, A extends Record> = {}> { private config; constructor(config: LogicConfig); create(): LogicRuntime>; createIsolated(scope?: Scope): LogicRuntime>; name(name: string): LogicFluentBuilder; computed>(computed: NC): LogicFluentBuilder; intent

(type: string, handler: IntentHandler): LogicFluentBuilder; intent(intents: Record>): LogicFluentBuilder; effect

(type: string, eff: EffectDef): LogicFluentBuilder; action>(key: K, factory: F): LogicFluentBuilder>; action>>(actions: NA): LogicFluentBuilder; build(): LogicFactory>; } export declare function extendLogic, A extends Record>>(factory: LogicFactory>): LogicFluentBuilder; export declare function createLogic, A extends Record>>(config: { name?: string; state: S; computed?: C & ComputedDef; intents?: (bus: IntentRegistry) => void; actions?: A; }): LogicFluentBuilder; export {};