/**
 * Template Override Resolver
 *
 * Universal system for resolving and using theme template overrides across all app/ routes
 *
 * SECURITY ARCHITECTURE:
 *
 * This system implements a layered security model where some layouts
 * are protected from theme overrides to maintain security boundaries:
 *
 * 1. CORE SECURITY LAYER (Non-overrideable):
 *    - Files that DON'T use template overrides cannot be overridden
 *    - Example: /app/dashboard/layout.tsx (contains auth logic)
 *    - These files provide essential security boundaries
 *    - Configured via PROTECTED_PATHS array
 *
 * 2. UI CUSTOMIZATION LAYER (Overrideable):
 *    - Files that USE template overrides can be themed
 *    - Example: /app/dashboard/(main)/layout.tsx (custom UI/sidebar)
 *    - Example: /app/(auth)/signup/page.tsx (custom signup experience)
 *    - These run within security boundaries of parent layouts
 *
 * UNIVERSAL USAGE PATTERNS:
 *
 * 1. HOC Pattern (Recommended for new files):
 *    export default withTemplateOverrideFor('app/my-route/page.tsx')(MyComponent)
 *
 * 2. Direct Function Pattern (Compatible with existing files):
 *    export default getTemplateOrDefault('app/my-route/page.tsx', MyComponent)
 *
 * 3. Protected Path Configuration:
 *    Add to PROTECTED_PATHS to prevent theme overrides for security
 *
 * This ensures themes can override ANY route (pages, layouts, etc.) while
 * maintaining granular security control where critical.
 */
import React from 'react';
/**
 * Get template component with fallback - Granular Protection Support
 * Use this in your app router files to conditionally use theme templates
 *
 * Respects granular protection levels:
 * - PROTECTED_ALL: Returns default component (no override)
 * - PROTECTED_RENDER: Returns default component (component protected)
 * - PROTECTED_METADATA: Allows component override
 * - NONE: Allows component override
 */
export declare function getTemplateOrDefault<T = any>(appPath: string, defaultComponent: T): T;
/**
 * Get template metadata with fallback - Granular Protection Support
 * Use this in your app router files to conditionally use theme metadata
 *
 * Respects granular protection levels:
 * - PROTECTED_ALL: Returns default metadata (no override)
 * - PROTECTED_RENDER: Allows metadata override (KEY FEATURE!)
 * - PROTECTED_METADATA: Returns default metadata (metadata protected)
 * - NONE: Allows metadata override
 */
export declare function getMetadataOrDefault(appPath: string, defaultMetadata: any): any;
/**
 * Hook to check if current route has template override
 */
export declare function useTemplateOverride(pathname: string): {
    hasPageOverride: boolean;
    hasLayoutOverride: boolean;
    pageTemplate: any;
    layoutTemplate: any;
    getPageComponent: () => any;
    getLayoutComponent: () => any;
};
/**
 * Utility to resolve template with metadata
 */
export declare function getTemplateWithInfo(appPath: string): {
    hasOverride: boolean;
    component?: any;
    template?: TemplateOverride;
    originalPath: string;
};
/**
 * Debug utility to show template override status
 */
export declare function debugTemplateOverrides(): void;
/**
 * Universal HOC for Template Override Resolution - Granular Protection Support
 *
 * Automatically detects component path and resolves theme overrides.
 *
 * Usage:
 *   export default withTemplateOverride(MyComponent, 'app/signup/page.tsx')
 *
 * Security:
 *   Respects granular protection levels - only blocks component override when necessary
 */
export declare function withTemplateOverride<T extends React.ComponentType<any>>(Component: T, appPath: string): T;
/**
 * Curried version for cleaner usage
 *
 * Usage:
 *   export default withTemplateOverrideFor('app/(auth)/signup/page.tsx')(SignupPage)
 */
export declare function withTemplateOverrideFor(appPath: string): <T extends React.ComponentType<any>>(Component: T) => T;
//# sourceMappingURL=template-resolver.d.ts.map