import { ReactNode } from 'react';
import { Language } from '@smg-automotive/i18n-pkg';
import { Auth0UserType } from '@smg-automotive/auth';
import { Project } from 'src/types/project';
import { Environment } from 'src/types/environment';
import { Entitlement } from 'src/types/entitlements';
import { Brand } from 'src/types/brand';
import { UserTypeExternal } from './header/types';
export type LinkTargets = '_blank';
export interface VisibilitySettings {
    brand: Record<Brand, boolean>;
    userType?: {
        private: boolean;
        professional: boolean;
        guest?: boolean;
    };
}
export type LocalizedLinks = Record<Language, string>;
export interface EntitlementConfig {
    singleRequiredEntitlement: Entitlement[];
    missingEntitlementFallbackLink?: LocalizedLinks;
    missingEntitlementLinkIcon?: ReactNode;
    missingEntitlementTranslationKey?: string;
    hideIfEntitlementIsPresent?: Entitlement;
    hideIfRequiredEntitlementIsMissing?: boolean;
}
export interface LinkConfig {
    title?: string;
    translationKey?: string;
    translationParameters?: Record<string, string | number>;
    link?: LocalizedLinks;
    onClick?: () => void;
    target?: LinkTargets;
    visibilitySettings: VisibilitySettings;
    forceMotoscoutLink?: boolean;
    forceAutoscoutLink?: boolean;
    entitlementConfig?: EntitlementConfig;
    projectIdentifier?: Project;
}
export interface LinkInstance {
    title?: string;
    translationKey?: string;
    link?: LocalizedLinks;
    target?: LinkTargets;
    isVisible: boolean;
    onClick?: () => void;
}
export type Domains = Record<Brand, Record<Environment, string>>;
export declare class Link {
    title?: string;
    translationKey?: string;
    translationParameters?: Record<string, string | number>;
    link?: LocalizedLinks;
    target?: LinkTargets;
    onClick?: () => void;
    isVisible: boolean;
    rightIcon?: ReactNode;
    forceMotoscoutLink?: boolean;
    forceAutoscoutLink?: boolean;
    projectIdentifier?: Project;
    constructor({ config, brand, userType, environment, useAbsoluteUrls, project, linkProtocol, domains, forceMotoscoutLink, forceAutoscoutLink, userEntitlements, rightIcon, }: {
        config: LinkConfig;
        brand: Brand;
        userType?: UserTypeExternal.Guest | Auth0UserType;
        environment: Environment;
        useAbsoluteUrls: boolean;
        project?: Project;
        linkProtocol: string;
        domains: Domains;
        forceMotoscoutLink?: boolean;
        forceAutoscoutLink?: boolean;
        userEntitlements?: string[];
        rightIcon?: ReactNode;
    });
    private static shouldDisplayMissingEntitlementTranslation;
    private static shouldDisplayMissingEntitlementIcon;
    private resolveLink;
    private prefixDomain;
    private static determineVisibility;
    private static hasRestrictedEntitlement;
    private static hideIfRequiredEntitlementIsMissing;
}
//# sourceMappingURL=link.d.ts.map