import type { ReactNode } from 'react';
import type { RouteObject } from 'react-router-dom';
import type { ExtensionConfig } from '@/extensions/types';
/**
 * Configuration for SmartStack
 */
export interface SmartStackConfig {
    /**
     * Base URL for the SmartStack API
     * @example 'http://localhost:5142' or 'https://api.myapp.com'
     */
    apiUrl: string;
    /**
     * Default language for i18n
     * @default 'fr'
     */
    defaultLanguage?: 'fr' | 'en';
    /**
     * Enable debug mode (additional logging)
     * @default false
     */
    debug?: boolean;
    /**
     * Custom logo component to display in header
     */
    logo?: ReactNode;
    /**
     * Application name displayed in header
     */
    appName?: string;
    /**
     * License key for SmartStack features
     */
    licenseKey?: string;
    /**
     * Frontend extension configuration
     * Allows clients to override pages, inject content into slots,
     * and extend tables/forms without forking the codebase.
     *
     * @example
     * ```tsx
     * extensions: {
     *   pages: {
     *     'platform.administration.users': CustomUsersPage,
     *   },
     *   slots: {
     *     'users.form.fields.after': UserExtensionFields,
     *   },
     * }
     * ```
     */
    extensions?: ExtensionConfig;
}
/**
 * Route configuration for custom routes
 */
export interface RouteConfig {
    /**
     * Route path (e.g., '/', '/about', '/pricing')
     */
    path: string;
    /**
     * React element to render for this route
     */
    element: ReactNode;
    /**
     * Optional child routes
     */
    children?: RouteConfig[];
    /**
     * Optional index route flag
     */
    index?: boolean;
}
/**
 * Context-scoped route extensions for injecting routes into SmartStack locked contexts.
 *
 * Routes are specified with paths relative to the context root.
 * They are automatically injected into both standard and tenant-prefixed route trees.
 *
 * @example
 * ```tsx
 * const contextRoutes: ContextRouteExtensions = {
 *   business: [
 *     { path: 'ressourceshumaines/timemanagement/dashboard', element: <TimeDashboard /> },
 *     { path: 'ressourceshumaines/timemanagement/list', element: <TimeList /> },
 *   ],
 * };
 *
 * const routes = mergeRoutes(clientRoutes, contextRoutes);
 * ```
 */
export interface ContextRouteExtensions {
    /** Routes injected as children of /business (BusinessLayout) */
    business?: RouteObject[];
    /** Routes injected as children of /platform (AdminLayout) */
    platform?: RouteObject[];
    /** Routes injected as children of /personal/myspace (UserLayout) */
    personal?: RouteObject[];
}
/**
 * Route priority levels
 */
export type RoutePriority = 'client' | 'smartstack';
/**
 * Internal route definition with metadata
 */
export interface InternalRoute extends RouteConfig {
    /**
     * Source of the route (for conflict resolution)
     */
    source: RoutePriority;
    /**
     * Whether this route is locked (cannot be overridden)
     */
    locked?: boolean;
}
//# sourceMappingURL=types.d.ts.map