import 'reflect-metadata';
import { LoggerInterface } from '@worktif/utils';
import { SeoEngineDynamoDbEntity } from '../../entities/seo-engine/seo-engine.dynamo.entity';
import { SeoMetaData } from '../../entities/seo-engine/seo-engine.dynamo.types';
/**
 * SeoProvider is a service responsible for managing SEO metadata retrieval and caching.
 * It queries DynamoDB for default and route-specific SEO metadata, merges them with proper
 * override logic, and provides fallback defaults when DynamoDB is unavailable.
 *
 * The provider caches default SEO metadata to avoid repeated DynamoDB queries and ensures
 * rendering never fails due to SEO metadata issues by returning hardcoded defaults on errors.
 *
 * Default priority order:
 * 1. Route-specific metadata from DynamoDB (highest priority)
 * 2. Default metadata from DynamoDB (`[seo-defaults]` route)
 * 3. Initialization defaults from `runtime({ defaultSeoMeta: {...} })`
 * 4. Hardcoded framework defaults (lowest priority)
 */
export declare class SeoProvider implements LoggerInterface {
    private seoEntity;
    /**
     * Logger instance for the SEO provider service.
     */
    loggerInstance: import("@aws-lambda-powertools/logger").Logger;
    /**
     * Cached default SEO metadata to avoid repeated DynamoDB queries.
     * Loaded once on first use and reused for subsequent requests.
     */
    private defaultSeo;
    /**
     * Runtime configuration passed from Lambda handler.
     * Contains initialization defaults from runtime() configuration.
     */
    private runtime;
    /**
     * Constructor for SeoProvider.
     *
     * @param {SeoEngineDynamoDbEntity} seoEntity - The DynamoDB entity for SEO metadata operations.
     */
    constructor(seoEntity: SeoEngineDynamoDbEntity);
    /**
     * Sets the runtime configuration from Lambda handler.
     * This should be called by the Lambda handler to provide runtime defaults.
     *
     * @param {any} runtime - The runtime configuration from Lambda Layer.
     */
    setRuntime(runtime: any): void;
    /**
     * Gets SEO metadata for a specific route with default fallback.
     * Caches default SEO to avoid repeated DynamoDB queries.
     *
     * This method implements the following logic:
     * 1. Load default SEO from DynamoDB (cached after first load)
     * 2. Load route-specific SEO from DynamoDB
     * 3. Merge route-specific values over defaults
     * 4. Return hardcoded defaults on any error to prevent rendering failures
     *
     * @param {string} route - The application route to fetch SEO metadata for.
     * @return {Promise<SeoMetaData>} Complete SEO metadata for the route.
     */
    getSeoForRoute(route: string): Promise<SeoMetaData>;
    /**
     * Loads default SEO metadata with the following priority:
     * 1. DynamoDB defaults (route `[seo-defaults]`)
     * 2. Initialization defaults from `runtime({ defaultSeoMeta: {...} })`
     * 3. Hardcoded framework defaults
     *
     * @return {Promise<SeoMetaData>} Default SEO metadata.
     * @private
     */
    private loadDefaultSeo;
    /**
     * Gets initialization defaults from the runtime configuration.
     * Returns null if no initialization defaults are configured.
     *
     * Priority:
     * 1. Runtime passed from Lambda handler (this.runtime)
     * 2. Runtime from browser context (getRuntimeDefaultSeoMeta)
     *
     * @return {SeoMetaData | null} Initialization defaults or null.
     * @private
     */
    private getInitializationDefaults;
    /**
     * Merges route-specific SEO metadata with default SEO metadata.
     * Route-specific values override defaults for all fields where route-specific values are non-empty.
     *
     * Logic: defaults -> current SEO from DB
     * Meta tags MUST NOT persist between pages. Only defaults are used as fallback for empty fields.
     *
     * @param {SeoMetaData} defaults - The default SEO metadata.
     * @param {SeoMetaDynamoDb | undefined} routeSeo - The route-specific SEO metadata from DynamoDB.
     * @return {SeoMetaData} Merged SEO metadata with route-specific overrides.
     * @private
     */
    private mergeSeo;
    /**
     * Converts DynamoDB entity to SeoMetaData type.
     * Ensures keywords are properly converted to array format.
     *
     * @param {SeoMetaDynamoDb} dynamoData - The DynamoDB entity.
     * @return {SeoMetaData} Converted SEO metadata.
     * @private
     */
    private convertDynamoToSeoMetaData;
    /**
     * Returns hardcoded fallback defaults when DynamoDB is unavailable.
     * These defaults ensure rendering never fails due to missing SEO metadata.
     *
     * @return {SeoMetaData} Hardcoded default SEO metadata.
     * @private
     */
    private getHardcodedDefaults;
}
