import * as React from 'react';
import { ReactNode } from 'react';
import { a as BlockRecord, c as BlockType, b as BlockService, A as ArtifactRefBlockRecord, T as TextBlockRecord, B as BlockComponentProps } from './types-D1b8v7EY.js';
export { d as blockTypes } from './types-D1b8v7EY.js';
import './types-GCkXbyFm.js';
import './types-B2aYk82c.js';

/** Props for the Block dispatcher. */
interface BlockProps {
    /** The block to render. Dispatched to the registered concrete component for its `type`. */
    block: BlockRecord;
}
/**
 * Dispatches a single block to its registered concrete component. Unknown types render as a no-op.
 *
 * Generic by design: per-block-type extras (e.g. localized artifact labels for `ARTIFACT_REF`)
 * live on the block's `payload`, not as sibling props here. That keeps the dispatcher's contract
 * shallow — third-party `BlockService` implementors only need to handle `{ block }` — and lets
 * the consumer materialise a fully-decorated block once (from the server payload + their i18n
 * layer) instead of threading sibling props through every dispatch site.
 */
declare function Block({ block }: BlockProps): ReactNode;

/** Renderer-level concerns provided to descendants of any `Block`-rendering tree. */
interface BlockContextValue {
}
declare const BlockContext: React.Context<BlockContextValue | null>;
/** Returns the ambient block-rendering context. Returns an empty object outside a `<BlockContext.Provider>`. */
declare function useBlockContext(): BlockContextValue;

declare const BlockServices: Record<BlockType, BlockService>;

declare const ArtifactRefBlockService: BlockService<ArtifactRefBlockRecord>;

declare const TextBlockService: BlockService<TextBlockRecord>;

/**
 * Renders an `ARTIFACT_REF` block by dispatching the inlined artifact to its per-type component.
 *
 * The cast at the seam is necessary because the registry-based dispatch can't statically prove
 * type-T narrowing — but it's not hiding a bug. `ArtifactRefBlockRecord` is a distributed union
 * over `ArtifactRecord` branches (see `blocks/types.ts`), so TS catches wrong-shape labels at the
 * consumer's construction site: a chart-labels bag assigned to a TABLE block's payload is a type
 * error there, not silently forwarded to the wrong renderer here.
 *
 * Unknown artifact types render as `null` — the map only contains types we know how to render,
 * so an older clay client receiving a future artifact type degrades silently rather than
 * crashing the chat.
 */
declare function ArtifactRefBlock({ block }: BlockComponentProps<ArtifactRefBlockRecord>): ReactNode;

export { ArtifactRefBlock, ArtifactRefBlockRecord, ArtifactRefBlockService, Block, BlockComponentProps, BlockContext, type BlockContextValue, BlockRecord, BlockService, BlockServices, BlockType, TextBlockRecord, TextBlockService, useBlockContext };
