import { InventoryItem, ServiceInvoiceCreatedResponse } from './api';
export interface CryptoSteamSDKConfig {
    supported_screen_formats: ('landscape' | 'portrait' | 'fullscreen' | 'fullscreen-desktop')[];
    supported_devices: string[];
    title: string;
    app_url: string;
}
export type Audience = 'start_page_default' | 'start_page_few_ads' | 'start_page_no_ads' | 'start_page_games' | 'banner_test';
export interface ProfileBalances {
    coins: number;
    gems: number;
    ny2026_tickets: number;
    usdt: number;
}
export interface CryptoSteamSDKProfile {
    id: number;
    avatar_ug: string;
    user_name: string;
    first_name: string;
    last_name: string;
    language: string;
    email: string;
    email_confirmed: boolean;
    phone_number: string;
    location: string;
    background_color: string;
    override_ads: boolean;
    ton_address: string;
    audiences: Audience[];
    is_premium: boolean;
    allows_write_to_pm: boolean;
    ads_disabled_until?: string;
    created: string;
    updated: string;
    avatar: string;
    birth_date: string;
    balance_gems: number;
    balance_coins: number;
    experience: number;
    balance_usdt: number;
    minimum_usdt_withdraw: number;
    level: number;
    level_up_exp: number;
    current_level_exp: number;
    invited: number;
    invited_full: number;
    games_count: number;
    ads_free: boolean;
    is_admin: boolean;
    inventory: InventoryItem[];
    game_id?: number | string;
    onboarding: boolean;
    review_stats: {
        total: number;
        with_comments: number;
    };
    balances: ProfileBalances;
}
export interface CryptoSteamSDKShopItem {
    id: number;
    name: string;
    description: string;
    price: number;
    created: string;
    updated: string;
}
export declare enum CryptoSteamSDKAdMediaType {
    Image = "image",
    Gif = "gif",
    Video = "video"
}
export interface CryptoSteamSDKAd {
    is_available: boolean;
    url?: string;
    mediaType?: CryptoSteamSDKAdMediaType;
    durationS?: number;
}
export interface CryptoSteamSDKWage {
    active_wages: {
        current_value: number;
        id: number;
        max_value: number;
        price: number;
        started_at: string;
        time_limit: string;
        title: string;
        type_id: number;
    }[];
    available_wages: {
        current_value: number;
        id: number;
        max_value: number;
        price: number;
        started_at: string;
        time_limit: string;
        title: string;
        type_id: number;
    }[];
    claimable_wages: {
        current_value: number;
        id: number;
        max_value: number;
        price: number;
        started_at: string;
        time_limit: string;
        title: string;
        type_id: number;
    }[];
}
export interface OverlayConfig {
    onOverlayOpen?: () => void;
    onOverlayClose?: () => void;
    variant?: 'light' | 'dark' | 'translucent';
    initialPosition?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
    initialCoordinates?: {
        x: number;
        y: number;
    };
    botId?: string;
    authData?: string;
    visible?: boolean;
}
export interface CryptoSteamSDKTask {
    id: number;
    title: string;
    description: string;
    reward: number;
    group?: string;
    group_position?: number;
    sub_title?: string;
    is_claimable: boolean;
    is_done: boolean;
}
export type AdType = 'REWARD' | 'INTERSTITIAL';
export interface RequestAdOptions {
    onStart?: () => void;
    placementId?: string;
}
export interface InitializeOptions {
    mode?: 'portal';
    authData?: string;
    disable_startup_ads?: boolean;
}
export interface StartupConfig {
    /**
     * @deprecated This field is no longer supported. Fullscreen configuration is now done through Portal.
     */
    isFullscreen: boolean;
    overlayPosition: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
}
export interface CryptoSteamSDK {
    version: string;
    onAdStart: (() => void) | null;
    onAdEnd: ((result: boolean) => void) | null;
    initialize: (botId?: string, options?: InitializeOptions) => Promise<void>;
    getConfig: () => Promise<CryptoSteamSDKConfig>;
    /**
     * @deprecated Always returns `true`.
     *
     * Some games used to gate `requestRewardAd` behind this check and would skip
     * the reward flow when ads were disabled. We now want `requestRewardAd` to
     * always be called so users who paid for an ad-free experience still receive
     * their reward (delivered without an ad).
     */
    isAdEnabled: () => Promise<boolean>;
    requestAd: (options?: RequestAdOptions) => Promise<boolean>;
    requestRewardAd: (options?: RequestAdOptions) => Promise<boolean>;
    getProfile: () => Promise<CryptoSteamSDKProfile>;
    getBalance: () => Promise<BalanceResponse>;
    getWages: () => Promise<CryptoSteamSDKWage>;
    claimWage: (id: number) => Promise<void>;
    startWage: (id: number) => Promise<void>;
    setValueWage: (params: RequestWageValueParams) => Promise<void>;
    trackGameTimeTick: () => void;
    getVersion: () => string;
    initializeOverlay: (config?: OverlayConfig) => void;
    getShopItems: () => Promise<CryptoSteamSDKShopItem[]>;
    getPurchasedShopItem: (itemId: number) => Promise<CryptoSteamSDKShopItem>;
    getPurchasedShopItems: () => Promise<CryptoSteamSDKShopItem[]>;
    buyShopItem: (itemId: number) => Promise<void>;
    openPurchaseConfirmModal: (shopItem: CryptoSteamSDKShopItem, rect?: {
        x: number;
        y: number;
        width: number;
        height: number;
    }) => Promise<PurchaseConfirmResponse>;
    createInvoice: (title: string, description: string, to_user_id: number, amount: number) => Promise<ServiceInvoiceCreatedResponse>;
    getValue: (key: string) => Promise<string>;
    setValue: (key: string, value: string) => Promise<void>;
    /**
     * @deprecated
     * @param key
     */
    getData: (key: string) => Promise<string>;
    /**
     * @deprecated
     * @param key
     * @param value
     */
    setData: (key: string, value: string) => Promise<void>;
    removeValue: (key: string) => Promise<void>;
    getAllKeyValues: () => Promise<Record<string, string>>;
    getLocale: () => string;
    showSharing: (url: string, text?: string) => void;
    telegramCloudStorage: TelegramCloudStorage;
    gameReady: () => void;
    getAdsgramController: () => AdsgramController | null;
    getLaunchResponse: () => LaunchResponse | null;
    isLaunchedFromPortal: () => boolean;
    setBottomBanner: () => void;
    clearBottomBanner: () => void;
    /**
     * Show the overlay if it was initialized with visible: false or hidden via hideOverlay()
     */
    showOverlay: () => void;
    /**
     * Hide the overlay while keeping it loaded
     */
    hideOverlay: () => void;
    /**
     * Check if the overlay is currently visible
     */
    isOverlayVisible: () => boolean;
}
export interface PortalEmuSDK {
    isAdRunning: () => boolean;
    getValueSync: (key: string) => string;
    setValueSync: (key: string, value: string) => void;
    removeValueSync: (key: string) => Promise<void>;
    reloadAd: () => void;
    getStartParam: () => string;
    requestAd: () => Promise<void>;
}
export interface ConfigCache {
    config: CryptoSteamSDKConfig;
    expiresAt: number;
}
export interface LaunchResponse {
    tma_ads_key: string;
    ads?: {
        type: 'tma' | 'monetag' | 'adsgram' | 'gigapub';
        tmaAdsKey?: string;
        monetag?: string;
        adsgram?: string;
        gigapub?: string;
    };
    ads_last_showed: string | Date;
    is_ad_cooldown: boolean;
    launched: number;
    total_launches: number;
}
export interface PurchaseConfirmResponse {
    status: 'success' | 'error';
}
export interface TelegramCloudStorage {
    getValue: (key: string) => Promise<string | null>;
    setValue: (key: string, value: string) => Promise<boolean | null>;
    removeValue: (key: string) => Promise<boolean | null>;
}
export interface TMANetworkInterstitialResponse {
    id: string;
    reward: boolean;
}
export interface ShowPromiseResult {
    done: boolean;
    description: string;
    state: 'load' | 'render' | 'playing' | 'destroy';
    error: boolean;
}
export interface AdsgramController {
    show(): Promise<ShowPromiseResult>;
}
export interface AdsgramInitOptions {
    blockId: string;
}
export interface BalanceResponse {
    balance: number;
    balance_gems: number;
    balance_coins: number;
}
export interface RequestWageValueParams {
    wageId: number;
    value: number;
}
export interface ConfirmMessage {
    type: 'confirm' | 'cancel' | 'error';
    message?: string;
}
export interface OrbitAdsResponse {
    campaign?: {
        id: number;
        type: AdType;
        layout?: string;
        link: string;
        creative?: {
            url: string;
            colors: string[];
            width: number;
            height: number;
        };
        banner?: string;
    };
    is_direct_sales: boolean;
}
