import { type ReactNode } from "react";
import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
import type { ListParams, ListResult } from "@stigmer/sdk";
import type { WorkbenchColumnDef, FilterDef, FilterValue, SortValue, BulkAction, ViewMode } from "../types";
/** Props for {@link ResourceWorkbench}. */
export interface ResourceWorkbenchProps<TData = SearchResult> {
    /**
     * Async function that fetches a page of resources. Receives `ListParams`
     * and returns `ListResult`. Pass `null` to disable fetching.
     */
    readonly listFn: ((params: ListParams) => Promise<ListResult>) | null;
    /** Organization slug. Pass `null` to disable fetching. */
    readonly org: string | null;
    /** Column definitions for the table view. */
    readonly columns?: readonly WorkbenchColumnDef<TData>[];
    /** Available filter definitions. */
    readonly filterDefs?: readonly FilterDef[];
    /** Available view modes. @default ["table", "cards", "list"] */
    readonly viewModes?: readonly ViewMode[];
    /** Default view mode. @default "table" */
    readonly defaultViewMode?: ViewMode;
    /**
     * localStorage key for persisting view mode preference.
     * Pass `undefined` to disable persistence.
     */
    readonly viewModeStorageKey?: string;
    /**
     * Custom card renderer for card view. Receives the item and its index.
     * When omitted, the workbench falls back to a default card layout.
     */
    readonly renderCard?: (item: TData, index: number) => ReactNode;
    /**
     * Custom row renderer for list view. Receives the item and its index.
     * When omitted, falls back to a default row layout.
     */
    readonly renderRow?: (item: TData, index: number) => ReactNode;
    /** Per-item action renderer (shown in table rows, card corners, list ends). */
    readonly renderItemAction?: (item: TData) => ReactNode;
    /**
     * Inspector content renderer. When provided, clicking an item opens
     * the split-panel inspector with this content. When omitted, the
     * inspector is disabled.
     */
    readonly renderInspector?: (item: TData) => ReactNode;
    /** Bulk actions available when items are selected. */
    readonly bulkActions?: readonly BulkAction<TData>[];
    /** Called when an item is clicked (navigates to detail, etc.). */
    readonly onItemClick?: (item: TData) => void;
    /** Initial filter values (e.g. restored from URL on mount). */
    readonly initialFilters?: readonly FilterValue[];
    /** Initial sort (e.g. restored from URL on mount). */
    readonly initialSort?: SortValue | null;
    /** Initial search query (e.g. restored from URL on mount). */
    readonly initialQuery?: string;
    /** Scope for resource visibility. @default "org" */
    readonly scope?: "org" | "all";
    /** Called when scope changes (for Console to persist). */
    readonly onScopeChange?: (scope: "org" | "all") => void;
    /** Called when any filter/sort/query state changes (for URL sync). */
    readonly onStateChange?: (state: {
        filters: readonly FilterValue[];
        sort: SortValue | null;
        query: string;
    }) => void;
    /** Enable selection checkboxes and bulk actions. @default false */
    readonly enableSelection?: boolean;
    /** Extracts a unique ID from an item (for selection tracking). */
    readonly getItemId?: (item: TData) => string;
    /** Icon for the empty state. */
    readonly emptyIcon?: ReactNode;
    /** Title for the empty state. */
    readonly emptyTitle?: string;
    /** Description for the empty state. */
    readonly emptyDescription?: string;
    /**
     * Custom CTA rendered in the first-use empty state (no items, no
     * active filters). Use this to provide a creation entry point that
     * is visually co-located with the "no resources yet" message.
     *
     * Accepts any ReactNode — typically a `<Link>` or `<button>`.
     */
    readonly emptyAction?: ReactNode;
    /** Called when the user clicks "Retry" after an error. */
    readonly onRetry?: () => void;
    /**
     * Primary action rendered right-aligned in the toolbar, after the
     * view mode switcher. Use this for the workbench's main creation
     * entry point — e.g. a "Create agent" button or link.
     *
     * Accepts any ReactNode so consumers control routing and styling.
     */
    readonly headerAction?: ReactNode;
    /** Search input placeholder text. @default "Search\u2026" */
    readonly searchPlaceholder?: string;
    /** Accessible label for the workbench region. @default "Resource workbench" */
    readonly "aria-label"?: string;
    /** Additional CSS classes for the root container. */
    readonly className?: string;
}
/**
 * Full-featured resource collection workbench that composes headless
 * hooks and focused view components into a complete browsing experience.
 *
 * Provides:
 * - Toolbar with search input, filter chips, and view mode switcher
 * - Three view modes: table, cards, and compact list
 * - Row/card selection with bulk action bar
 * - Optional split-panel inspector for item previews
 * - Empty, loading, and error states
 * - Pagination
 *
 * The workbench is the "drop-in" tier of the resource collection
 * architecture. Platform builders who want more control use the
 * individual hooks and view components directly.
 *
 * @example
 * ```tsx
 * <ResourceWorkbench
 *   listFn={(params) => stigmer.agent.list(params)}
 *   org={activeOrg}
 *   columns={agentColumns}
 *   filterDefs={agentFilterDefs}
 *   renderItemAction={(item) => <AgentActionMenu item={item} />}
 *   onItemClick={(item) => navigate(`/agents/${item.slug}`)}
 *   emptyTitle="No agents yet"
 *   emptyDescription="Create an agent to get started."
 * />
 * ```
 */
export declare function ResourceWorkbench<TData = SearchResult>({ listFn, org, columns, filterDefs, viewModes, defaultViewMode, viewModeStorageKey, renderCard, renderRow, renderItemAction, renderInspector, bulkActions, onItemClick, initialFilters, initialSort, initialQuery, scope: controlledScope, onScopeChange, onStateChange, enableSelection, getItemId, emptyIcon, emptyTitle, emptyDescription, emptyAction, onRetry, headerAction, searchPlaceholder, "aria-label": ariaLabel, className, }: ResourceWorkbenchProps<TData>): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=ResourceWorkbench.d.ts.map