/**
 * SlotsContext - React state-based UI slot management
 *
 * Replaces the UIEnvironment observable store with plain React state.
 * No stacking logic, no priority system, no source tracking for arbitration.
 *
 * A transition's effects produce the COMPLETE content for each slot.
 * The runtime collects all render-ui effects from a transition, groups by slot,
 * and sets each slot's patterns array in one atomic operation.
 *
 * @packageDocumentation
 */
import React from 'react';
import type { PatternConfig } from '@almadar/core';
import type { ResolvedTrait } from '@almadar/core';
/** A single pattern entry in a slot */
export interface SlotPatternEntry {
    pattern: PatternConfig;
    props: Record<string, unknown>;
}
/**
 * Source metadata for a rendered slot.
 * Used by the Slot Inspector to show debug info.
 */
export interface SlotSource {
    trait: string;
    state: string;
    transition: string;
    effects?: unknown[];
    /** Full trait definition for inspector */
    traitDefinition?: ResolvedTrait;
}
/** Full state of a single slot */
export interface SlotState {
    patterns: SlotPatternEntry[];
    source?: SlotSource;
}
/** All slots state */
export type SlotsState = Record<string, SlotState>;
/** Mutation functions for slots (stable references, won't trigger re-renders) */
export interface SlotsActions {
    /** Set all patterns for a slot atomically (replaces previous content) */
    setSlotPatterns: (slot: string, patterns: SlotPatternEntry[], source?: SlotSource) => void;
    /** Clear a single slot */
    clearSlot: (slot: string) => void;
    /** Clear all slots */
    clearAllSlots: () => void;
}
export interface SlotsProviderProps {
    children: React.ReactNode;
}
/**
 * SlotsProvider - Manages UI slot state via React useState.
 *
 * Replaces UIEnvironmentProvider. No observable store, no stacking logic.
 * Slots are set atomically per transition — React diffs and re-renders.
 */
export declare function SlotsProvider({ children }: SlotsProviderProps): React.ReactElement;
/**
 * Get the full slots state. Triggers re-render on ANY slot change.
 * Prefer useSlotContent(name) for individual slot subscriptions.
 */
export declare function useSlots(): SlotsState;
/**
 * Get content for a specific slot. Returns null if slot is empty.
 */
export declare function useSlotContent(slotName: string): SlotState | null;
/**
 * Get slot mutation actions. Stable reference — never triggers re-renders.
 */
export declare function useSlotsActions(): SlotsActions;
