/** * Control flow & composition components — ForEach, If, Elif, Else, Define, Use, Slot */ import { Component, ContainerComponent } from '../../core/component.js'; import type { ContainerProps, ComponentProps, RxStr } from '../../core/component.js'; export interface ForEachProps extends ContainerProps { expression: RxStr; let?: Record; } export declare function ForEach(props: ForEachProps): ContainerComponent; export interface ConditionProps extends ContainerProps { condition: RxStr; } /** * Conditional rendering. * * @example Full props form: * ```ts * If({ condition: '$count > 0', children: [Text({ text: 'Has items' })] }) * ``` * * @example Shorthand (condition + children): * ```ts * If('$count > 0', [Text({ text: 'Has items' })]) * ``` */ export declare function If(propsOrCondition: ConditionProps | RxStr, children?: Component[]): ContainerComponent; /** * Else-if conditional rendering. * * @example Shorthand: * ```ts * Elif('$count === 0', [Text({ text: 'Empty' })]) * ``` */ export declare function Elif(propsOrCondition: ConditionProps | RxStr, children?: Component[]): ContainerComponent; export declare function Else(props?: ContainerProps): ContainerComponent; /** * Define a reusable named component template. * Goes into the `defs` section of the wire format. */ export interface DefineProps extends ContainerProps { /** Unique name for this definition. */ name: string; } export declare function Define(props: DefineProps): ContainerComponent; /** * Reference a named definition (from defs). * Resolves to the component tree defined by `Define`. */ export interface UseProps extends ComponentProps { /** Name of the definition to use. */ def: string; /** Override props to pass to the definition. */ overrides?: Record; } export declare function Use(props: UseProps): Component; /** * Dynamic content injection point. * Used inside `Define` to mark where child content is placed. */ export interface SlotProps extends ComponentProps { /** Optional named slot identifier. */ name?: string; /** Fallback content if no injection provided. */ fallback?: Component; } export declare function Slot(props?: SlotProps): Component; //# sourceMappingURL=index.d.ts.map