/// <reference types="react" />
import * as React from 'react';
import React__default, { ReactNode, ComponentType } from 'react';

declare enum LoginStatus {
    CONNECTED = "connected",
    AUTHORIZATION_EXPIRED = "authorization_expired",
    NOT_AUTHORIZED = "not_authorized",
    UNKNOWN = "unknown"
}

declare type AuthResponse = {
    userID: string;
    accessToken: string;
};
declare type LoginResponse = {
    status: LoginStatus.CONNECTED;
    authResponse: AuthResponse;
} | {
    status: Exclude<LoginStatus, LoginStatus.CONNECTED>;
};
declare type LoginOptions$1 = {
    scope?: string;
    returnScopes?: boolean;
    authType?: string[];
    rerequest?: boolean;
    reauthorize?: boolean;
};
declare global {
    interface Window {
        fbAsyncInit: () => void;
        FB: any;
    }
}
declare enum Method {
    GET = "get",
    POST = "post",
    DELETE = "delete"
}
declare enum Namespace {
    UI = "ui",
    API = "api",
    LOGIN = "login",
    LOGOUT = "logout",
    GET_LOGIN_STATUS = "getLoginStatus",
    GET_AUTH_RESPONSE = "getAuthResponse"
}
declare type FacebookOptions = {
    domain?: string;
    version?: string;
    cookie?: boolean;
    status?: boolean;
    xfbml?: boolean;
    language?: string;
    frictionlessRequests?: boolean;
    debug?: boolean;
    chatSupport?: boolean;
    appId: string;
    autoLogAppEvents?: boolean;
    lazy?: boolean;
};
declare class Facebook {
    options: FacebookOptions;
    loadingPromise: Promise<any> | undefined;
    constructor(options: FacebookOptions);
    getAppId(): string;
    getFB(): any;
    init(): Promise<Facebook>;
    process<Response>(namespace: Namespace, before?: any[], after?: any[]): Promise<Response>;
    ui(options: any): Promise<unknown>;
    api<T>(path: string, method?: Method, params?: {}): Promise<T>;
    login(options: LoginOptions$1): Promise<LoginResponse>;
    logout(): Promise<unknown>;
    getLoginStatus(): Promise<LoginResponse>;
    getAuthResponse(): Promise<unknown>;
    getTokenDetail(loginResponse?: LoginResponse): Promise<AuthResponse>;
    getProfile(params: any): Promise<unknown>;
    getTokenDetailWithProfile(params: any, response: any): Promise<{
        profile: unknown;
        tokenDetail: AuthResponse;
    }>;
    getToken(): Promise<string>;
    getUserId(): Promise<string>;
    sendInvite(to: string, options: any): Promise<unknown>;
    postAction(ogNamespace: string, ogAction: string, ogObject: string, ogObjectUrl: string, noFeedStory?: boolean): Promise<unknown>;
    getPermissions(): Promise<{
        permission: string;
        status: 'granted';
    }[]>;
    hasPermissions(permissions: string[]): Promise<boolean>;
    subscribe<T>(eventName: string, callback: (value: T) => void): Promise<() => Promise<void>>;
    unsubscribe<T>(eventName: string, callback: (value: T) => void): Promise<void>;
    parse(parentNode: HTMLElement): Promise<void>;
    getRequests(): Promise<unknown>;
    removeRequest(requestId: string): Promise<unknown>;
    setAutoGrow(): Promise<void>;
    paySimple(product: string, quantity?: number): Promise<unknown>;
    pay(product: string, options: any): Promise<unknown>;
}

declare type FacebookProviderProps = FacebookOptions & {
    children: ReactNode;
};
declare function FacebookProvider(props: FacebookProviderProps): JSX.Element;

declare type ParserProps = {
    children: ReactNode;
    inline?: boolean;
};
declare function Parser(props: ParserProps): JSX.Element;
declare const _default$f: React__default.MemoExoticComponent<typeof Parser>;

declare type LikeProps = {
    referral?: string;
    href?: string;
    layout?: 'standard' | 'button_count' | 'button' | 'box_count';
    showFaces?: boolean;
    colorScheme?: string;
    action?: string;
    share?: boolean;
    children?: ReactNode;
    width?: number | string;
    size?: string;
    kidDirectedSite?: boolean;
    lazy?: boolean;
};
declare const _default$e: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<LikeProps & React__default.RefAttributes<unknown>>>;

declare type ShareOptions = {
    href: string;
    display: 'iframe' | 'popup' | 'async' | 'page';
    hashtag?: string;
    redirectUri?: string;
};
declare function useShare(): {
    isLoading: boolean;
    error: Error | undefined;
    share: (options: ShareOptions) => Promise<unknown>;
};

declare type LoginButton$1 = ShareOptions & {
    children?: ReactNode;
    asChild?: ComponentType | keyof JSX.IntrinsicElements;
    disabled?: boolean;
};
declare function ShareButton(props: LoginButton$1): JSX.Element;

declare type PageProps = {
    href?: string;
    tabs?: string;
    hideCover?: boolean;
    height?: number | string;
    width?: number | string;
    showFacepile?: boolean;
    hideCTA?: boolean;
    smallHeader?: boolean;
    adaptContainerWidth?: boolean;
    lazy?: boolean;
    children?: ReactNode;
    style?: Object;
};
declare const _default$d: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<PageProps & React__default.RefAttributes<unknown>>>;

declare type LoginOptions = {
    scope?: string;
    returnScopes?: boolean;
    authType?: string[];
    rerequest?: boolean;
    reauthorize?: boolean;
};
declare function useLogin(): {
    login: (loginOptions: LoginOptions, callback?: ((response: LoginResponse) => void) | undefined) => Promise<{
        status: LoginStatus.CONNECTED;
        authResponse: AuthResponse;
    }>;
    error: Error | undefined;
    isLoading: boolean;
    status: LoginStatus | undefined;
};

declare type LoginButton = LoginOptions & {
    children?: ReactNode;
    asChild?: ComponentType | keyof JSX.IntrinsicElements;
    disabled?: boolean;
    onError?: (error: Error) => void;
    onSuccess?: (response: LoginResponse) => void;
};
declare function LoginButton(props: LoginButton): JSX.Element;

declare type EmbeddedPostProps = {
    href: string;
    width?: string | number;
    showText?: boolean;
    lazy?: boolean;
    children?: ReactNode;
};
declare const _default$c: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<EmbeddedPostProps & React__default.RefAttributes<unknown>>>;

declare type EmbeddedVideoProps = {
    href: string;
    width?: number | string;
    showText?: boolean;
    allowFullScreen?: boolean;
    autoPlay?: boolean;
    showCaptions?: boolean;
    lazy?: boolean;
    children?: ReactNode;
};
declare const _default$b: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<EmbeddedVideoProps & React__default.RefAttributes<unknown>>>;

declare type CommentsProps = {
    href?: string;
    numPosts?: number;
    orderBy?: 'reverse_time' | 'time';
    width?: number | string;
    colorScheme?: 'light' | 'dark';
    children?: ReactNode;
    mobile?: boolean;
    lazy?: boolean;
};
declare const _default$a: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<CommentsProps & React__default.RefAttributes<unknown>>>;

declare type CommentsCountProps = {
    href?: string;
    children?: ReactNode;
};
declare const _default$9: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<CommentsCountProps & React__default.RefAttributes<unknown>>>;

declare type GroupProps = {
    href?: string;
    skin?: string;
    showSocialContext?: boolean;
    showMetaData?: boolean;
    width?: number | string;
    lazy?: boolean;
    children?: ReactNode;
    style?: Object;
};
declare const _default$8: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<GroupProps & React__default.RefAttributes<unknown>>>;

declare type SaveProps = {
    uri?: string;
    lazy?: boolean;
    children?: ReactNode;
    style?: Object;
};
declare const _default$7: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<SaveProps & React__default.RefAttributes<unknown>>>;

declare type ShareProps = {
    href?: string;
    lazy?: boolean;
    size?: 'small' | 'large';
    layout?: 'box_count' | 'button_count' | 'button' | 'icon_link';
    children?: ReactNode;
    style?: Object;
};
declare const _default$6: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ShareProps & React__default.RefAttributes<unknown>>>;

declare type CustomChatProps = {
    pageId: string;
    children?: ReactNode;
    themeColor?: string;
    loggedInGreeting?: string;
    loggedOutGreeting?: string;
    dataRef?: string;
    greetingDialogDisplay?: 'show' | 'fade' | 'hide';
    greetingDialogDelay?: string;
    minimized?: boolean;
};
declare const _default$5: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<CustomChatProps & React__default.RefAttributes<unknown>>>;

declare type MessageUsProps = {
    messengerAppId: string;
    pageId: string;
    color?: 'blue' | 'white';
    children?: ReactNode;
    size?: 'standard' | 'large' | 'xlarge';
    dataRef?: string;
};
declare const _default$4: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MessageUsProps & React__default.RefAttributes<unknown>>>;

declare type MessengerCheckboxProps = {
    messengerAppId: string;
    pageId: string;
    userRef?: string;
    origin?: string;
    children?: ReactNode;
    size?: string;
    prechecked?: boolean;
    allowLogin?: boolean;
    centerAlign?: boolean;
    skin?: string;
};
declare const _default$3: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MessengerCheckboxProps & React__default.RefAttributes<unknown>>>;

declare type SendToMessengerProps = {
    messengerAppId: string;
    pageId: string;
    color?: 'blue' | 'white';
    children?: ReactNode;
    dataRef?: string;
    size?: 'standard' | 'large' | 'xlarge';
    enforceLogin?: boolean;
    ctaText?: 'GET_THIS_IN_MESSENGER' | 'RECEIVE_THIS_IN_MESSENGER' | 'SEND_THIS_TO_ME' | 'GET_CUSTOMER_ASSISTANCE' | 'GET_CUSTOMER_SERVICE' | 'GET_SUPPORT' | 'LET_US_CHAT' | 'SEND_ME_MESSAGES' | 'ALERT_ME_IN_MESSENGER' | 'SEND_ME_UPDATES' | 'MESSAGE_ME' | 'LET_ME_KNOW' | 'KEEP_ME_UPDATED' | 'TELL_ME_MORE' | 'SUBSCRIBE_IN_MESSENGER' | 'SUBSCRIBE_TO_UPDATES' | 'GET_MESSAGES' | 'SUBSCRIBE' | 'GET_STARTED_IN_MESSENGER' | 'LEARN_MORE_IN_MESSENGER' | 'GET_STARTED';
};
declare const _default$2: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<SendToMessengerProps & React__default.RefAttributes<unknown>>>;

declare type FacebookContextInterface = {
    isLoading: boolean;
    error: Error | undefined;
    init: () => Promise<Facebook | undefined>;
    api: Facebook | undefined;
    parse: (element: HTMLDivElement | HTMLSpanElement) => Promise<void>;
};
declare const _default$1: React.Context<FacebookContextInterface | undefined>;

declare enum LikeSize {
    SMALL = "small",
    LARGE = "large"
}

declare enum LikeLayout {
    STANDARD = "standard",
    BUTTON_COUNT = "button_count",
    BUTTON = "button",
    BOX_COUNT = "box_count"
}

declare enum ColorScheme {
    LIGHT = "light",
    DARK = "dark"
}

declare enum LikeAction {
    LIKE = "like",
    RECOMMEND = "recommend"
}

declare enum CommentsOrderBy {
    SOCIAL = "social",
    REVERSE_TIME = "reverse_time",
    TIME = "time"
}

declare enum MessengerSize {
    SMALL = "small",
    MEDIUM = "medium",
    STANDARD = "standard",
    LARGE = "large",
    XLARGE = "xlarge"
}

declare enum MessengerColor {
    BLUE = "blue",
    WHITE = "white"
}

declare const _default: string[];

declare type UseFacebookProps = {
    lazy?: boolean;
};
declare function useFacebook(props?: UseFacebookProps): FacebookContextInterface;

declare function useLoginStatus(): {
    isLoading: boolean;
    error?: Error;
    status?: LoginStatus;
};

declare function useProfile(fields: string[]): {
    isLoading: boolean;
    error: Error | undefined;
    profile: any;
};

declare function useSubscribe<T>(event: string, callback?: (data: any) => void): T | undefined;

export { ColorScheme, _default$a as Comments, _default$9 as CommentsCount, CommentsOrderBy, _default$5 as CustomChat, _default$c as EmbeddedPost, _default$b as EmbeddedVideo, _default$1 as FacebookContext, FacebookProvider, _default as Fields, _default$8 as Group, _default$e as Like, LikeAction, LikeLayout, LikeSize, LoginButton, LoginStatus, _default$4 as MessageUs, _default$3 as MessengerCheckbox, MessengerColor, MessengerSize, _default$d as Page, _default$f as Parser, _default$7 as Save, _default$2 as SendToMessenger, _default$6 as Share, ShareButton, useFacebook, useLogin, useLoginStatus, useProfile, useShare, useSubscribe };
