export interface DeviceInfo {
    developerId: string;
    friendlyName: string;
    deviceModel: string;
    firmwareVersion: string;
    serialNumber: string;
    clientId: string;
    RIDA: string;
    countryCode: string;
    timeZone: string;
    timeZoneIANA: string;
    timeZoneAuto: boolean;
    timeZoneOffset: number;
    locale: SupportedLocale;
    clockFormat: string;
    displayMode: DisplayMode;
    captionMode: CaptionMode;
    captionStyle: CaptionStyleOption[];
    captionLanguage: SupportedLanguage;
    assets: ArrayBufferLike;
    maxSimulStreams: 1 | 2;
    remoteControls: RemoteControl[];
    customFeatures: string[];
    connectionInfo: ConnectionInfo;
    localIps: string[];
    startTime: number;
    audioVolume: number;
    audioLanguage: SupportedLanguage;
    maxFps: number;
    tmpVolSize: number;
    cacheFSVolSize: number;
    registry?: Map<string, string>;
    registryBuffer?: SharedArrayBuffer;
    models?: Map<string, string[]>;
    audioCodecs?: string[];
    videoFormats?: Map<string, string[]>;
    appList?: AppData[];
    entryPoint?: boolean;
    debugOnCrash?: boolean;
    corsProxy?: string;
    extensions?: Map<SupportedExtension, string>;
}
export type SupportedLocale = "en_US" | "en_GB" | "en_CA" | "en_AU" | "fr_CA" | "es_ES" | "es_MX" | "de_DE" | "it_IT" | "pt_BR";
export type SupportedLanguage = "en" | "es" | "fr" | "de" | "it" | "pt" | "ru" | "tr" | "pl" | "uk" | "rm" | "nl" | "hr" | "hu" | "el" | "cs" | "sv";
export declare const DisplayModes: readonly ["480p", "720p", "1080p"];
export type DisplayMode = (typeof DisplayModes)[number];
export declare const CaptionModes: readonly ["Off", "On", "Instant replay", "When mute"];
export type CaptionMode = (typeof CaptionModes)[number];
/**
 * Parses a caption mode string into a CaptionMode type.
 * @param mode The caption mode string to parse
 * @returns The parsed CaptionMode or undefined if invalid
 */
export declare function parseCaptionMode(mode: string): CaptionMode | undefined;
export declare const DefaultCertificatesFile = "common:/certs/ca-bundle.crt";
export declare const Platform: PlatformInfo;
export declare const DefaultDeviceInfo: DeviceInfo;
export declare const CaptionFonts: Map<string, string>;
export declare const CaptionSizes: Map<string, number[]>;
export declare const CaptionColors: Map<string, string>;
export declare const CaptionOpacities: Map<string, number>;
export declare const CaptionOptions: Map<string, string[]>;
export type CaptionStyleOption = {
    id: string;
    style: string;
};
/**
 * Supported Extensions Enumerator
 *
 * This enumerator is used to define the supported BrightScript extensions
 *
 */
export declare enum SupportedExtension {
    SceneGraph = "brs-scenegraph",
    SDK1 = "brs-sdk1",// Legacy SDK1 extension - planned
    BrightSign = "brs-brightsign"
}
/**
 * Extension Information Type
 */
export type ExtensionInfo = {
    name: string;
    library: string;
    version: string;
};
/** Type guard to check if a value is an ExtensionInfo object.
 * @param value the value to check
 * @returns true if the value is an ExtensionInfo object, false otherwise
 */
export declare function isExtensionInfo(value: any): value is ExtensionInfo;
/**
 * Registry Data Interface
 */
export interface RegistryData {
    readonly current: Map<string, string>;
    readonly removed: string[];
    isDirty: boolean;
}
/**
 * Type guard to check if a value is a RegistryData object.
 * @param value the value to check
 * @returns true if the value is a RegistryData object, false otherwise
 */
export declare function isRegistryData(value: any): value is RegistryData;
export type AppPayload = {
    device: DeviceInfo;
    launchTime: number;
    manifest: Map<string, string>;
    deepLink: Map<string, string>;
    paths: PkgFilePath[];
    source: string[];
    extensions?: SupportedExtension[];
    pkgZip?: ArrayBuffer;
    extZip?: ArrayBuffer;
    password?: string;
    root?: string;
    ext?: string;
};
/**
 * Type guard to check if a value is an AppPayload object.
 * @param value The value to check
 * @returns True if the value is a valid AppPayload
 */
export declare function isAppPayload(value: any): value is AppPayload;
export type TaskPayload = {
    device: DeviceInfo;
    manifest: Map<string, string>;
    taskData: TaskData;
    extensions?: SupportedExtension[];
    pkgZip?: ArrayBuffer;
    extZip?: ArrayBuffer;
    root?: string;
    ext?: string;
};
/**
 * Type guard to check if a value is a TaskPayload object.
 * @param value The value to check
 * @returns True if the value is a valid TaskPayload
 */
export declare function isTaskPayload(value: any): value is TaskPayload;
export declare enum TaskState {
    INIT = 0,
    RUN = 1,
    STOP = 2,
    DONE = 3
}
export type TaskData = {
    id: number;
    name: string;
    state: TaskState;
    buffer?: SharedArrayBuffer;
    tmp?: SharedArrayBuffer;
    cacheFS?: SharedArrayBuffer;
    m?: any;
    scene?: any;
    render?: string;
};
/**
 * Type guard to check if a value is a TaskData object.
 * @param value The value to check
 * @returns True if the value is a valid TaskData
 */
export declare function isTaskData(value: any): value is TaskData;
export type ThreadInfo = {
    id: string;
    type: "Main" | "Render" | "Task";
    name?: string;
};
export type ThreadUpdate = {
    id: number;
    type: "global" | "task" | "scene";
    field: string;
    value: any;
};
/**
 * Type guard to check if a value is a ThreadUpdate object.
 * @param value The value to check
 * @returns True if the value is a valid ThreadUpdate
 */
export declare function isThreadUpdate(value: any): value is ThreadUpdate;
/**
 * Generates a random 6-character hexadecimal address.
 * @returns A random hex string in uppercase format (e.g., "A1B2C3")
 */
export declare function genHexAddress(): string;
export type PkgFilePath = {
    id: number;
    url: string;
    type: "source" | "pcode";
};
export declare enum AppExitReason {
    Unknown = "EXIT_UNKNOWN",
    Crashed = "EXIT_BRIGHTSCRIPT_CRASH",
    UnkFunction = "EXIT_BRIGHTSCRIPT_UNK_FUNC",
    UserNav = "EXIT_USER_NAV",
    Settings = "EXIT_SETTINGS_UPDATE",
    PowerMode = "EXIT_POWER_MODE",
    Packaged = "EXIT_PACKAGER_DONE",
    Invalid = "EXIT_INVALID_PCODE",
    NoPassword = "EXIT_MISSING_PASSWORD",
    UnpackFail = "EXIT_UNPACK_FAILED"
}
export type AppData = {
    id: string;
    title: string;
    subtitle?: string;
    version: string;
    path?: string;
    icon?: string;
    password?: string;
    exitReason?: AppExitReason;
    exitTime?: number;
    params?: Map<string, string>;
    running?: boolean;
};
/**
 * Type guard to check if a value is an AppData object.
 * @param value The value to check
 * @returns True if the value is a valid AppData
 */
export declare function isAppData(value: any): value is AppData;
/**
 * NDK Start Interface
 */
export type NDKStart = {
    app: "roku_browser" | "SDKLauncher";
    params: string[];
    env: string[];
};
/**
 * Type guard to check if a value is an NDKStart object.
 * @param value The value to check
 * @returns True if the value is a valid NDKStart
 */
export declare function isNDKStart(value: any): value is NDKStart;
export type RemoteControl = {
    model: number;
    features: string[];
};
export type PlatformInfo = {
    inBrowser: boolean;
    inChromium: boolean;
    inFirefox: boolean;
    inSafari: boolean;
    inElectron: boolean;
    inAndroid: boolean;
    inIOS: boolean;
    inMacOS: boolean;
    inWindows: boolean;
    inLinux: boolean;
    inChromeOS: boolean;
};
export type ConnectionInfo = {
    type: "WiFiConnection" | "WiredConnection" | "";
    name: string;
    ip: string;
    gateway: string;
    quality: "Excellent" | "Good" | "Fair" | "Poor";
    dns?: string[];
    protocol?: string;
    ssid?: string;
};
export declare enum DataType {
    DBG = 0,// Debug Command
    BUF = 1,// Buffer flag
    VDO = 2,// Video Event
    VDX = 3,// Video Event Index
    VSE = 4,// Video Selected
    VLP = 5,// Video Load Progress
    VPS = 6,// Video Position
    VDR = 7,// Video Duration
    VAT = 8,// Video Audio Track
    VTT = 9,// Video Text Track
    SND = 10,// Sound Event
    SDX = 11,// Sound Event Index
    SPS = 12,// Sound Position
    SDR = 13,// Sound Duration
    WAV = 14,// Wave Audio
    WAV1 = 15,// Reserved for second stream
    WAV2 = 16,// Reserved for third stream
    WAV3 = 17,// Reserved for fourth stream
    MUHS = 18,// Memory Used Heap Size
    MHSL = 19,// Memory Heap Size Limit
    MBWD = 20,// Measured Bandwidth
    CEC = 21,// Consumer Electronics Control
    HDMI = 22,// HDMI Status
    RID = 23,// Remote Id
    KEY = 24,// Key Code
    MOD = 25
}
export declare const registryInitialSize: number;
export declare const registryMaxSize: number;
export declare const keyBufferSize = 5;
export declare const keyArraySpots = 3;
export declare const dataBufferIndex: number;
export declare const dataBufferSize = 1024;
export declare enum RemoteType {
    IR = 10,// Infra Red (default)
    WD = 20,// Wifi Direct (keyboard simulation)
    BT = 30,// Bluetooth (gamepad simulation)
    SIM = 40,// Simulated
    ECP = 50,// External Control Protocol
    RMOB = 60
}
export interface KeyEvent {
    remote: string;
    key: number;
    mod: number;
}
export declare const debugPrompt = "Brightscript Debugger> ";
export declare enum DebugCommand {
    BSCS = 0,
    BT = 1,
    CLASSES = 2,
    CONT = 3,
    EXIT = 4,
    EXPR = 5,
    HELP = 6,
    LAST = 7,
    LIST = 8,
    NEXT = 9,
    STATS = 10,
    STEP = 11,
    THREAD = 12,
    THREADS = 13,
    VAR = 14,
    BREAK = 15,
    PAUSE = 16
}
export declare enum MediaEvent {
    Selected = 0,
    Full = 1,
    Partial = 2,
    Paused = 3,
    Resumed = 4,
    Finished = 5,
    Failed = 6,
    Loading = 7,
    StartStream = 8,
    StartPlay = 9,
    Position = 10,
    TooMany = 11
}
export declare enum MediaErrorCode {
    Network = 0,
    Http = -1,
    TimeOut = -2,
    Unknown = -3,
    EmptyList = -4,
    Unsupported = -5,
    DRM = -6
}
export interface MediaTrack {
    id: string;
    name: string;
    lang: string;
    codec?: string;
}
/**
 * Type guard to check if a value is a MediaTrack object.
 * @param value The value to check
 * @returns True if the value is a valid MediaTrack
 */
export declare function isMediaTrack(value: any): value is MediaTrack;
export declare enum BufferType {
    DEBUG_EXPR = 0,
    MEDIA_TRACKS = 1,
    SYS_LOG = 2,
    INPUT = 3
}
export declare const DefaultSounds: string[];
export declare const MaxSoundStreams = 4;
export declare const AudioExt: Set<string>;
export declare const VideoExt: Set<string>;
/**
 * Detects the platform where the BrightScript engine is running.
 * Checks for browser type, OS, and runtime environment.
 * @returns PlatformInfo object with boolean flags for each platform
 */
export declare function getPlatform(): PlatformInfo;
/**
 * Parses a Roku manifest file into a Map of key-value pairs.
 * Ignores empty lines and comments starting with #.
 * @param contents The manifest file content as a string
 * @returns Map containing the parsed manifest entries
 */
export declare function parseManifest(contents: string): Map<string, string>;
/**
 * Returns the AppExitReason enum value from a string.
 * @param value The exit reason string to parse
 * @returns The corresponding AppExitReason or AppExitReason.Unknown if invalid
 */
export declare function getExitReason(value: string): AppExitReason;
/**
 * Converts a number to an 8-character hexadecimal string.
 * @param value The number to convert
 * @param pad Optional padding character (defaults to "0")
 * @returns Hexadecimal string representation padded to 8 characters
 */
export declare function numberToHex(value: number, pad?: string): string;
/**
 * Parses text file content into an array of lines.
 * @param content Optional text file content as a string
 * @returns Array of lines from the text file (empty array if no content)
 */
export declare function parseTextFile(content?: string): string[];
/**
 * Extracts Roku OS version components from a firmware string.
 * @param firmware The firmware version string (e.g., "48G.04E05531A")
 * @returns Map with keys: major, minor, revision, build, plid
 */
export declare function getRokuOSVersion(firmware: string): Map<string, string>;
/**
 * Returns the current UTC timestamp in Roku beacon date format.
 * @returns Formatted date string (MM-DD HH:MM:SS.ms)
 */
export declare function getNow(): string;
