import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
import * as react from 'react';
import * as _btst_yar from '@btst/yar';
import { QueryClient } from '@tanstack/react-query';
import { S as SerializedBoardWithColumns } from '../../../shared/stack.DJaKVY7v.js';
export { K as KanbanPluginOverrides, a as KanbanUser } from '../../../shared/stack.FeaWkglm.js';

/**
 * Context passed to route hooks
 */
interface RouteContext {
    /** Current route path */
    path: string;
    /** Route parameters (e.g., { boardId: "abc123" }) */
    params?: Record<string, string>;
    /** Whether rendering on server (true) or client (false) */
    isSSR: boolean;
    /** Additional context properties */
    [key: string]: unknown;
}
/**
 * Context passed to loader hooks
 */
interface LoaderContext {
    /** Current route path */
    path: string;
    /** Route parameters */
    params?: Record<string, string>;
    /** Whether rendering on server (true) or client (false) */
    isSSR: boolean;
    /** Base URL for API calls */
    apiBaseURL: string;
    /** Path where the API is mounted */
    apiBasePath: string;
    /** Optional headers for the request */
    headers?: Headers;
    /** Additional context properties */
    [key: string]: unknown;
}
/**
 * Configuration for kanban client plugin
 */
interface KanbanClientConfig {
    /** Base URL for API calls (e.g., "http://localhost:3000") */
    apiBaseURL: string;
    /** Path where the API is mounted (e.g., "/api/data") */
    apiBasePath: string;
    /** Base URL of your site for SEO meta tags */
    siteBaseURL: string;
    /** Path where pages are mounted (e.g., "/pages") */
    siteBasePath: string;
    /** React Query client instance for caching */
    queryClient: QueryClient;
    /** Optional SEO configuration for meta tags */
    seo?: {
        /** Site name for Open Graph tags */
        siteName?: string;
        /** Default description */
        description?: string;
        /** Locale for Open Graph (e.g., "en_US") */
        locale?: string;
        /** Default image URL for social sharing */
        defaultImage?: string;
    };
    /** Optional hooks for customizing behavior */
    hooks?: KanbanClientHooks;
    /** Optional headers for SSR (e.g., forwarding cookies) */
    headers?: Headers;
}
/**
 * Hooks for kanban client plugin
 * All hooks are optional and allow consumers to customize behavior
 */
interface KanbanClientHooks {
    /**
     * Called before loading boards list. Throw an error to cancel loading.
     */
    beforeLoadBoards?: (context: LoaderContext) => Promise<void> | void;
    /**
     * Called after boards are loaded. Throw an error to cancel further processing.
     */
    afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<void> | void;
    /**
     * Called before loading a single board. Throw an error to cancel loading.
     */
    beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<void> | void;
    /**
     * Called after a board is loaded. Throw an error to cancel further processing.
     */
    afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<void> | void;
    /**
     * Called before loading the new board page. Throw an error to cancel.
     */
    beforeLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
    /**
     * Called after the new board page is loaded. Throw an error to cancel.
     */
    afterLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
    /**
     * Called when a loading error occurs
     */
    onLoadError?: (error: Error, context: LoaderContext) => Promise<void> | void;
}
/**
 * Kanban client plugin
 * Provides routes, components, and React Query hooks for kanban boards
 */
declare const kanbanClientPlugin: (config: KanbanClientConfig) => _btst_stack_plugins_client.ClientPlugin<Record<string, never>, {
    boards: {
        (inputCtx_0?: _btst_yar.InputContext<"/kanban", _btst_yar.RouteOptions> | undefined): {
            PageComponent?: react.ComponentType<unknown> | undefined;
            LoadingComponent?: react.ComponentType<unknown> | undefined;
            ErrorComponent?: react.ComponentType<unknown> | undefined;
            loader?: (() => Promise<void>) | undefined;
            meta?: (() => ({
                title: string;
                name?: undefined;
                content?: undefined;
                property?: undefined;
            } | {
                name: string;
                content: string;
                title?: undefined;
                property?: undefined;
            } | {
                property: string;
                content: string;
                title?: undefined;
                name?: undefined;
            })[]) | undefined;
            extra?: (() => any) | undefined;
        };
        options: _btst_yar.RouteOptions | undefined;
        path: "/kanban";
        meta: _btst_yar.RouteMeta | undefined;
    };
    newBoard: {
        (inputCtx_0?: _btst_yar.InputContext<"/kanban/new", _btst_yar.RouteOptions> | undefined): {
            PageComponent?: react.ComponentType<unknown> | undefined;
            LoadingComponent?: react.ComponentType<unknown> | undefined;
            ErrorComponent?: react.ComponentType<unknown> | undefined;
            loader?: (() => Promise<void>) | undefined;
            meta?: (() => ({
                title: string;
                name?: undefined;
                content?: undefined;
                property?: undefined;
            } | {
                name: string;
                content: string;
                title?: undefined;
                property?: undefined;
            } | {
                property: string;
                content: string;
                title?: undefined;
                name?: undefined;
            })[]) | undefined;
            extra?: (() => any) | undefined;
        };
        options: _btst_yar.RouteOptions | undefined;
        path: "/kanban/new";
        meta: _btst_yar.RouteMeta | undefined;
    };
    board: {
        (inputCtx_0: _btst_yar.InputContext<"/kanban/:boardId", _btst_yar.RouteOptions>): {
            PageComponent?: react.ComponentType<unknown> | undefined;
            LoadingComponent?: react.ComponentType<unknown> | undefined;
            ErrorComponent?: react.ComponentType<unknown> | undefined;
            loader?: (() => Promise<void>) | undefined;
            meta?: (() => ({
                title: string;
                name?: undefined;
                content?: undefined;
                property?: undefined;
            } | {
                name: string;
                content: string;
                title?: undefined;
                property?: undefined;
            } | {
                property: string;
                content: string;
                title?: undefined;
                name?: undefined;
            })[]) | undefined;
            extra?: (() => any) | undefined;
        };
        options: _btst_yar.RouteOptions | undefined;
        path: "/kanban/:boardId";
        meta: _btst_yar.RouteMeta | undefined;
    };
}>;

export { kanbanClientPlugin };
export type { KanbanClientConfig, KanbanClientHooks, LoaderContext, RouteContext };
