import { type ReactNode, type ComponentType } from "react";
import type { Liff } from "@line/liff";
import type { Profile } from "@liff/get-profile";
/**
 * LIFFアプリケーションのコンテキスト型を定義します。
 *
 * @interface LiffContextType
 * @property {Profile | null} currentUser - 現在のLINEユーザープロフィール情報。未ログイン時はnull。
 * @property {Liff | null} liffControls - LIFF SDKのインスタンス。初期化前またはエラー時はnull。
 * @property {string | null} liffError - LIFFの初期化時などに発生したエラーメッセージ。エラーがない場合はnull。
 * @property {boolean} isMock - モックモードで動作しているかどうかを示すフラグ。
 */
interface LiffContextType {
    currentUser: Profile | null;
    liffControls: Liff | null;
    liffError: string | null;
    isMock: boolean;
}
/**
 * LIFF SDKを初期化し、ユーザー情報を取得するカスタムフックです。
 * モックモードをサポートしており、環境変数または明示的な設定で有効化できます。
 *
 * @param {string} liffId - LINE Developers ConsoleでLIFFアプリに割り当てられたID
 * @param {string | null} ifWebMoveTo - LINEアプリ以外で開かれた場合にリダイレクトするURL（省略可）
 * @returns {object} LIFFの状態を含むオブジェクト
 * @returns {Profile | null} object.currentUser - 現在のLINEユーザープロフィール情報
 * @returns {Liff | null} object.liffControls - LIFF SDKのインスタンス
 * @returns {string | null} object.liffError - 発生したエラーメッセージ
 * @returns {boolean} object.isMock - モックモードで動作しているかどうか
 *
 * @example
 * const { currentUser, liffControls, liffError, isMock } = useLiff('1234567890-abcdefgh');
 */
export declare const useLiff: (liffId: string, ifWebMoveTo?: string | null) => {
    currentUser: Profile;
    liffControls: Liff;
    liffError: string;
    isMock: boolean;
};
/**
 * LiffProviderのプロパティ型を定義します。
 *
 * @interface LiffProviderProps
 * @property {ReactNode} children - プロバイダーの子要素
 * @property {ComponentType<{ error: string }>} [customError] - エラー発生時に表示するカスタムコンポーネント
 * @property {ReactNode} [customLoading] - ロード中に表示するカスタムコンポーネント
 * @property {string} liffId - LINE Developers ConsoleでLIFFアプリに割り当てられたID
 * @property {string} [ifWebMoveTo] - LINEアプリ以外で開かれた場合にリダイレクトするURL
 * @property {boolean} [mock] - モックモードを有効化するかどうか
 */
interface LiffProviderProps {
    children: ReactNode;
    customError?: ComponentType<{
        error: string;
    }>;
    customLoading?: ReactNode;
    liffId: string;
    ifWebMoveTo?: string;
    mock?: boolean;
}
/**
 * LIFFアプリケーションのプロバイダーコンポーネント。
 * LIFF SDKを初期化し、アプリケーション全体でLIFFの状態を共有します。
 *
 * @component
 * @param {LiffProviderProps} props - コンポーネントのプロパティ
 * @param {ReactNode} props.children - プロバイダーの子要素
 * @param {ComponentType<{ error: string }>} [props.customError] - エラー発生時に表示するカスタムコンポーネント
 * @param {ReactNode} [props.customLoading] - ロード中に表示するカスタムコンポーネント
 * @param {string} props.liffId - LINE Developers ConsoleでLIFFアプリに割り当てられたID
 * @param {string} [props.ifWebMoveTo] - LINEアプリ以外で開かれた場合にリダイレクトするURL
 * @param {boolean} [props.mock] - モックモードを有効化するかどうか
 * @returns {JSX.Element} LIFFプロバイダーコンポーネント
 *
 * @example
 * <LiffProvider
 *   liffId="1234567890-abcdefgh"
 *   customError={CustomErrorComponent}
 *   customLoading={<LoadingSpinner />}
 *   ifWebMoveTo="https://example.com"
 *   mock={process.env.NODE_ENV === 'development'}
 * >
 *   <App />
 * </LiffProvider>
 */
export declare const LiffProvider: React.FC<LiffProviderProps>;
/**
 * LIFFコンテキストにアクセスするためのカスタムフック。
 * コンポーネント内でLIFFの状態やAPIを使用するために利用します。
 *
 * @returns {LiffContextType} LIFFコンテキストの値
 * @returns {Profile | null} LiffContextType.currentUser - 現在のLINEユーザープロフィール情報
 * @returns {Liff | null} LiffContextType.liffControls - LIFF SDKのインスタンス
 * @returns {string | null} LiffContextType.liffError - 発生したエラーメッセージ
 * @returns {boolean} LiffContextType.isMock - モックモードで動作しているかどうか
 *
 * @example
 * const { currentUser, liffControls, liffError, isMock } = useLiffContext();
 *
 * // ユーザー名を取得
 * const userName = currentUser?.displayName || 'ゲスト';
 *
 * // メッセージを送信
 * const sendMessage = () => {
 *   if (liffControls) {
 *     liffControls.sendMessages([
 *       { type: 'text', text: 'こんにちは！' }
 *     ]);
 *   }
 * };
 */
export declare const useLiffContext: () => LiffContextType;
export {};
