import { ak as IxoBlockProps, I as IxoEditorType, b as FlowNodeRuntimeState, W as BlocknoteHandlers } from '../graphql-client-C82HQLeC.mjs';
export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, av as DomainCardData, au as DomainCardRenderer, am as DropPosition, ar as DynamicListData, as as DynamicListDataProvider, at as DynamicListPanelRenderer, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, al as ExternalDropZone, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, an as PageHeader, ap as PageHeaderMenuItem, ao as PageHeaderProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, aq as VisualizationRenderer, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from '../graphql-client-C82HQLeC.mjs';
import React$1, { PropsWithChildren } from 'react';
import * as zustand from 'zustand';
import * as _blocknote_core from '@blocknote/core';
export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
import 'yjs';
import 'matrix-js-sdk';

declare const DynamicListBlockSpec: {
    config: {
        readonly type: "dynamicList";
        readonly propSchema: {
            readonly listId: {
                readonly default: "";
            };
            readonly title: {
                readonly default: "";
            };
            readonly columns: {
                readonly default: "[]";
            };
            readonly dataSource: {
                readonly default: "{}";
            };
            readonly snapshot: {
                readonly default: "";
            };
            readonly snapshotTimestamp: {
                readonly default: "";
            };
            readonly panelDescription: {
                readonly default: "";
            };
            readonly actions: {
                readonly default: "[]";
            };
            readonly skill: {
                readonly default: "";
            };
        };
        readonly content: "none";
    };
    implementation: _blocknote_core.TiptapBlockImplementation<{
        readonly type: "dynamicList";
        readonly propSchema: {
            readonly listId: {
                readonly default: "";
            };
            readonly title: {
                readonly default: "";
            };
            readonly columns: {
                readonly default: "[]";
            };
            readonly dataSource: {
                readonly default: "{}";
            };
            readonly snapshot: {
                readonly default: "";
            };
            readonly snapshotTimestamp: {
                readonly default: "";
            };
            readonly panelDescription: {
                readonly default: "";
            };
            readonly actions: {
                readonly default: "[]";
            };
            readonly skill: {
                readonly default: "";
            };
        };
        readonly content: "none";
    }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
};

interface DynamicListBlockProps extends IxoBlockProps {
}

/**
 * Position in the list item layout
 * - topLeft: Primary identifier (e.g., name, title)
 * - bottomLeft: Secondary info (e.g., subtitle, address, description)
 * - topRight: Primary value (e.g., amount, percentage, status)
 * - bottomRight: Secondary value (e.g., role, date, additional info)
 */
type ColumnPosition = 'topLeft' | 'bottomLeft' | 'topRight' | 'bottomRight';
/**
 * Column definition for dynamic lists
 */
interface DynamicListColumn {
    /** Unique key matching data object properties */
    key: string;
    /** Display label for the column header (shown in table view, used for accessibility) */
    label: string;
    /** Position in the list item layout - optional, columns without position shown only in detail panel */
    position?: ColumnPosition;
    /** Data type for formatting and sorting */
    type?: 'string' | 'number' | 'date';
    /** Optional color for the text (Mantine color like 'blue', 'green', 'dimmed') */
    color?: string;
}
/**
 * DataSource describes how to fetch the list data
 * This is stored in the block so other users can reproduce the query
 */
interface DataSource {
    /** The DID (Decentralized Identifier) of the oracle that generated this data */
    oracleDid: string;
    /** Human-readable oracle name */
    oracleName?: string;
    /** A standalone query that can be used in a brand new conversation to reproduce this data */
    query: string;
    /** Tool name for programmatic re-fetch (if oracle supports it) */
    toolName?: string;
    /** Parameters for the tool call */
    params?: Record<string, any>;
    /** Human description of what this data represents */
    description?: string;
}
/**
 * Action that can be performed on a dynamic list item
 */
interface DynamicListAction {
    /** Unique identifier for the action */
    id: string;
    /** Display label for the action button */
    label: string;
    /** Optional button color (Mantine color like 'blue', 'green', 'red') */
    color?: string;
}
/**
 * Panel configuration for dynamic list item detail view
 */
interface DynamicListPanelConfig {
    /** Description shown at the top of the panel explaining what items represent */
    panelDescription?: string;
    /** List of actions that can be performed on items */
    actions?: DynamicListAction[];
}

interface BaseIconPickerProps {
    opened: boolean;
    onClose: () => void;
    onSelectIcon: (iconName: string) => void;
    onUploadClick?: () => void;
    currentIcon?: string;
}
declare function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children, currentIcon }: PropsWithChildren<BaseIconPickerProps>): React$1.JSX.Element;

interface PanelState {
    activePanel: string | null;
    registeredPanels: Map<string, React.ReactNode>;
    setActivePanel: (panelId: string | null) => void;
    closePanel: () => void;
    registerPanel: (id: string, content: React.ReactNode) => void;
    unregisterPanel: (id: string) => void;
}
declare const usePanelStore: zustand.UseBoundStore<zustand.StoreApi<PanelState>>;
declare const usePanel: (panelId: string, content: React.ReactNode) => {
    opened: boolean;
    open: () => void;
    close: () => void;
};

/**
 * Reactive hook that subscribes to a single node's runtime state in yDoc.runtime.
 *
 * Usage:
 *   const [runtime, updateRuntime] = useNodeRuntime(editor, block.id);
 *   // runtime.state, runtime.output, runtime.error, etc.
 *   // updateRuntime({ state: 'completed', output: { ... } });
 */
declare function useNodeRuntime(editor: IxoEditorType, nodeId: string): [FlowNodeRuntimeState, (updates: Partial<FlowNodeRuntimeState>) => void];

type CollapseEvent = 'collapse' | 'expand' | 'toggle';
type Listener = (event: CollapseEvent) => void;
interface ListBlocksUIContextValue {
    broadcastCollapse: (event: CollapseEvent) => void;
    subscribe: (listener: Listener) => () => void;
    isMaximized: boolean;
    setMaximized: (maximized: boolean) => void;
    toggleMaximized: () => void;
}
interface ListBlocksUIState extends ListBlocksUIContextValue {
    listeners: Set<Listener>;
}
/**
 * Zustand store for managing list blocks UI state (collapse/expand)
 * Works across multiple React instances (no React Context needed)
 */
declare const useListBlocksUIStore: zustand.UseBoundStore<zustand.StoreApi<ListBlocksUIState>>;
/**
 * Hook to access list blocks UI functionality
 * No provider needed - uses Zustand store directly
 */
declare const useListBlocksUI: () => ListBlocksUIContextValue;

/**
 * Defines a payload field available from a block action
 */
interface PayloadField {
    key: string;
    label: string;
    type: 'string' | 'number' | 'boolean' | 'object';
    description?: string;
    /** For object-type fields: known child fields */
    childFields?: PayloadField[];
}
/**
 * Defines an action that a block can perform and its resulting payload
 */
interface BlockActionDefinition {
    actionId: string;
    label: string;
    description: string;
    payloadSchema: PayloadField[];
    /** Optional: resolve dynamic payload fields (e.g. survey fields) at config time */
    resolveDynamicFields?: (context: {
        handlers: any;
        blockProps: Record<string, any>;
    }) => Promise<PayloadField[]>;
}
/**
 * Configuration field for a hooked action type
 */
interface HookedActionConfigField {
    key: string;
    label: string;
    type: 'string' | 'select' | 'blockSelect' | 'templateSelect';
    required: boolean;
    description?: string;
    placeholder?: string;
    blockTypes?: string[];
}
/**
 * Context provided to hooked action execute functions
 */
interface HookedActionContext {
    handlers: BlocknoteHandlers;
    editor: any;
    sourceBlock: any;
}
/**
 * Defines a type of hooked action (e.g., sendEmail, addLinkedEntity)
 */
interface HookedActionType {
    type: string;
    label: string;
    description: string;
    configSchema: HookedActionConfigField[];
    /**
     * Execute the hooked action
     * @param config - The action configuration from block props
     * @param payload - The payload from the triggering action
     * @param context - Handlers, editor, and source block
     */
    execute: (config: HookedActionInstanceConfig, payload: Record<string, any>, context: HookedActionContext) => Promise<void>;
}
/**
 * Configuration for a single hooked action instance on a block
 */
interface HookedActionInstanceConfig {
    id: string;
    type: string;
    enabled: boolean;
    config: Record<string, any>;
    /**
     * Maps action config fields to payload values
     * e.g., { 'to': '{{payload.agentAddress}}', 'claimId': '{{payload.claimId}}' }
     */
    variableMappings: Record<string, string>;
}
/**
 * Configuration for all hooked actions on a block, organized by action ID
 */
interface HookedActionsConfig {
    [actionId: string]: HookedActionInstanceConfig[];
}
/**
 * Result from executing hooked actions
 */
interface HookedActionsExecutionResult {
    executed: number;
    errors: string[];
}

/**
 * Register a hooked action type
 */
declare function registerHookedActionType(actionType: HookedActionType): void;
/**
 * Get a hooked action type by its type ID
 */
declare function getHookedActionType(type: string): HookedActionType | undefined;
/**
 * Get all registered hooked action types
 */
declare function getAllHookedActionTypes(): HookedActionType[];
/**
 * Register block action definitions for a block type
 */
declare function registerBlockActions(blockType: string, actions: BlockActionDefinition[]): void;
/**
 * Get action definitions for a block type
 */
declare function getBlockActions(blockType: string): BlockActionDefinition[];

interface UseHookedActionsProps {
    block: any;
    editor: any;
}
/**
 * Hook for executing hooked actions on a block
 *
 * @example
 * ```tsx
 * const { executeHookedActions } = useHookedActions({ block, editor });
 *
 * // After main action completes
 * const result = await handleCreate();
 * executeHookedActions('create', {
 *   coreAddress: result.coreAddress,
 *   groupAddress: result.groupAddress,
 *   transactionHash: result.transactionHash,
 * });
 * ```
 */
declare function useHookedActions({ block, editor }: UseHookedActionsProps): {
    executeHookedActions: (actionId: string, payload: Record<string, any>) => void;
    executeHookedActionsWithResults: (actionId: string, payload: Record<string, any>) => Promise<HookedActionsExecutionResult>;
};

/**
 * Register all built-in hooked action types
 * Call this at app initialization
 */
declare function registerBuiltInActionTypes(): void;

/**
 * Initialize the hooked actions system.
 * This registers all built-in action types and block action definitions.
 * Should be called once at app startup.
 */
declare function initializeHookedActions(): void;

interface HookedActionsTabProps {
    editor: any;
    block: any;
    /** Block action definitions - what actions this block exposes */
    blockActions: BlockActionDefinition[];
    /** Current hookedActions JSON string from block props */
    hookedActions: string;
    /** Callback when hookedActions config changes */
    onHookedActionsChange: (value: string) => void;
}

declare const HookedActionsTab: React$1.FC<HookedActionsTabProps>;

export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DataSource, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type HookedActionInstanceConfig, type HookedActionType, type HookedActionsConfig, HookedActionsTab, IxoEditorType, type ListBlocksUIContextValue, type Listener, type PayloadField, getAllHookedActionTypes, getBlockActions, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
