import { ReactNode } from 'react';
/**
 * Data object backing a single {@link PieCard}.
 *
 * The `name` field is mandatory because it is used to build realtime event
 * channel names (`pie{methodName}_{name}`). Any other fields are treated as
 * free-form props passed to the underlying card component.
 */
export interface PieCardData {
    /** Unique identifier of the card within the UI tree. */
    name: string;
    /** Arbitrary, card-specific props. */
    [key: string]: any;
}
/**
 * Props accepted by {@link PieCard}.
 *
 * `TStored` is the type of the `stored` prop. Defaults to `unknown` so the
 * default usage (`<PieCard …/>` without `stored`) stays loose; cards built
 * with `InputPie*ComponentProps<TData, TStored>` thread their `TStored`
 * through so `JSON.stringify(stored)` operates on a known shape.
 */
export interface PieCardProps<TStored = unknown> {
    /** Registered name of the card component to render. */
    card: string;
    /** Card data; must include a `name` used for event routing. */
    data: PieCardData;
    /**
     * Rendered children. PieCard does not mount any UI of its own. Optional
     * because input-only cards (`<PieCard stored={…}/>`) often have no
     * visible children — only the hidden form input.
     */
    children?: ReactNode;
    /**
     * Subscribe the card's `methods` to Socket.IO events of the form
     * `pie{methodName}_{data.name}`.
     */
    useSocketioSupport?: boolean;
    /**
     * Subscribe the card's `methods` to Centrifuge channels of the form
     * `pie{methodName}_{data.name}_{centrifugeChannel}`. Requires
     * {@link centrifugeChannel}.
     */
    useCentrifugeSupport?: boolean;
    /**
     * Subscribe the card's `methods` to Mitt events of the form
     * `pie{methodName}_{data.name}`. Used for in-process notifications
     * dispatched via `usePieEmit`.
     */
    useMittSupport?: boolean;
    /** Channel suffix appended to Centrifuge subscriptions. */
    centrifugeChannel?: string;
    /**
     * Map of method name → handler. Keys become part of the realtime event
     * names the card listens for; the handler receives the event payload.
     * Handlers are accessed via a ref so updating the map between renders
     * does not trigger re-subscription.
     */
    methods?: Record<string, (data: any) => void>;
    /**
     * When provided, renders a hidden input alongside `children` with
     * `name={data.name}` and `value={JSON.stringify(stored)}` so the value
     * can be submitted as part of a surrounding form.
     */
    stored?: TStored;
}
//# sourceMappingURL=index.d.ts.map