import type { NobjcObject } from "objc-js";
import type { _GKLocalPlayerListener } from "./GKLocalPlayerListener.js";
import type { _GKPlayer } from "./GKPlayer.js";
import type { _GKSavedGame } from "./GKSavedGame.js";
import type { _GKSavedGameListener } from "./GKSavedGameListener.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _NSViewController } from "../AppKit/NSViewController.js";
import type { _NSWindow } from "../AppKit/NSWindow.js";
import type { GKFriendsAuthorizationStatus } from "./GKFriendsAuthorizationStatus.js";
export declare class _GKLocalPlayer extends _GKPlayer {
    static alloc(): _GKLocalPlayer;
    static new(): _GKLocalPlayer;
    init(): _GKLocalPlayer;
    /**
     * Obtain the primary GKLocalPlayer object. The player is only available for offline play until logged in. A temporary player is created if no account is set up.
     */
    static local(): _GKLocalPlayer;
    static localPlayer(): _GKLocalPlayer;
    /**
     * Asynchronously load the recent players list as an array of GKPlayer. A recent player is someone that you have played a game with or is a legacy game center friend. Calls completionHandler when finished. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player
     */
    loadRecentPlayersWithCompletionHandler$(completionHandler: ((recentPlayers: _NSArray, error: _NSError) => void) | null): void;
    /**
     * Asynchronously load the challengable friends list as an array of GKPlayer. A challengable player is a friend player with friend level FL1 and FL2. Calls completionHandler when finished. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player
     */
    loadChallengableFriendsWithCompletionHandler$(completionHandler: ((challengableFriends: _NSArray, error: _NSError) => void) | null): void;
    /**
     * Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player
     */
    fetchItemsForIdentityVerificationSignature$(completionHandler: ((publicKeyURL: _NSURL, signature: _NSData, salt: _NSData, timestamp: number, error: _NSError) => void) | null): void;
    /**
     * A single listener may be registered once. Registering multiple times results in undefined behavior. The registered listener will receive callbacks for any selector it responds to.
     */
    registerListener$(listener: _GKLocalPlayerListener): void;
    unregisterListener$(listener: _GKLocalPlayerListener): void;
    unregisterAllListeners(): void;
    /**
     * @deprecated Use ``GKLocalPlayer/setDefaultLeaderboardIdentifier(_:completionHandler:)`` instead.
     */
    setDefaultLeaderboardCategoryID$completionHandler$(categoryID: _NSString | null, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * @deprecated Use ``GKLocalPlayer/loadDefaultLeaderboardIdentifier(completionHandler:)`` instead.
     */
    loadDefaultLeaderboardCategoryIDWithCompletionHandler$(completionHandler: ((categoryID: _NSString, error: _NSError) => void) | null): void;
    /** @deprecated Use ``GKLocalPlayer/authenticateHandler`` instead. */
    authenticateWithCompletionHandler$(completionHandler: ((error: _NSError) => void) | null): void;
    /** @deprecated Use ``GKLocalPlayer/loadFriends(_:)`` instead. */
    loadFriendPlayersWithCompletionHandler$(completionHandler: ((friendPlayers: _NSArray, error: _NSError) => void) | null): void;
    /**
     * Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player
     * @deprecated Use ``GKLocalPlayer/fetchItems(forIdentityVerificationSignature:)`` instead.
     */
    generateIdentityVerificationSignatureWithCompletionHandler$(completionHandler: ((publicKeyUrl: _NSURL, signature: _NSData, salt: _NSData, timestamp: number, error: _NSError) => void) | null): void;
    /**
     * Load the default leaderboard identifier for the local player Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present
     * @deprecated No longer supported
     */
    loadDefaultLeaderboardIdentifierWithCompletionHandler$(completionHandler: ((leaderboardIdentifier: _NSString, error: _NSError) => void) | null): void;
    /**
     * Set the default leaderboard for the current game Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present
     * @deprecated No longer supported
     */
    setDefaultLeaderboardIdentifier$completionHandler$(leaderboardIdentifier: _NSString, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * This method is obsolete. It will never be invoked and its implementation does nothing**
     * @deprecated Use ``GKLocalPlayer/loadFriends(_:)`` instead.
     */
    loadFriendsWithCompletionHandler$(completionHandler: ((friendIDs: _NSArray, error: _NSError) => void) | null): void;
    /**
     * loadFriendsAuthorizationStatus: Discussion: Calling this will asynchronously load the current friend list authorization status of calling application. There may be an server call involve so there could be some slight delay in getting the authorization status via handler block. Calls handler when finished. Error will be nil on success. Possible reasons for error: - Communication error with server. - NSGKFriendListUsageDescription missing from your Info.plist - User is not online - Unauthenticated player
     */
    loadFriendsAuthorizationStatus$(completionHandler: ((authorizationStatus: GKFriendsAuthorizationStatus, error: _NSError) => void) | null): void;
    /**
     * loadFriends: Discussion: Calling this method will asynchronously load the player Game Center's friend list scoped to the calling application. Calls handler when finished. When -loadFriendsAuthorizationStatus == GKFriendsAuthorizationStatusNotDetermined or GKFriendsAuthorizationStatusRemoved, calling this method will trigger a prompt to request friend list authorization from the user. When -loadFriendsAuthorizationStatus == GKFriendsAuthorizationStatusAuthorized, This method will return an array of GKPlayers which have agreed to share their friend list with the calling application based on the same bundleID. The NSGKFriendListUsageDescription key must be specified in your Info.plist; otherwise, GKErrorFriendListUsageDescriptionMissing will be returned, as your app will be assumed not to support friend list. Possible reasons for error: - Communication error with server. - AuthorizationStatus != GKFriendsAuthorizationStatusAuthorized - NSGKFriendListUsageDescription missing from your Info.plist - User is not online - Unauthenticated player
     */
    loadFriends$(completionHandler: ((friends: _NSArray, error: _NSError) => void) | null): void;
    /**
     * loadFriendsWithIdentifiers:completionHandler: Discussion: Calling this method will asynchronously return a list of GKPlayers to the provided scoped identifiers (gamePlayerID or teamPlayerID) that you can use to interact with GameKit framework. Calls handler when finished. When -loadFriendsAuthorizationStatus == GKFriendsAuthorizationStatusNotDetermined or GKFriendsAuthorizationStatusRemoved, calling this method will trigger a prompt to request friend list authorization from the user. This method accepts gamePlayerID or teamPlayerID, and if the identifier is valid, we will return a GKPlayer object correspond to that identifier. No GKPlayer object will be returned for invalid identifiers. If all supplied identifiers are invalid, and empty array will be returned. If a player's friend revoke the friend list authorization for your application, we will no longer return the GKPlayer object and you should delete the data you've collected for the player with gamePlayerID or teamPlayerID on your end. Possible reasons for error: - Communication error with server. - AuthorizationStatus != GKFriendsAuthorizationStatusAuthorized - NSGKFriendListUsageDescription missing from your Info.plist - Unauthenticated player - User is not online
     */
    loadFriendsWithIdentifiers$completionHandler$(identifiers: _NSArray, completionHandler: ((friends: _NSArray, error: _NSError) => void) | null): void;
    /**
     * presentFriendRequestCreatorFromViewController: Discussion: iOS only. When invoked, a Messages sheet will be presented on the viewController passed in, using the existing flow of presentation on behalf of an application. If an error is returned, control are returned directly to the application, without presentation. Possible reasons for error: - The local player user account is not allowed to add friends - The device is not allowing outgoing traffic at the time of the operation
     */
    presentFriendRequestCreatorFromViewController$error$(viewController: _NSViewController, error: NobjcObject | null): boolean;
    /**
     * presentFriendRequestCreatorFromWindow: Discussion: MacOS only. When invoked, if no error is encountered, the caller application is backgrounded and the 'Messages' application is launched/foregrounded, with a formatted friend request message. If an error occurs, controls are returned to the caller application, with an error describing the error. Possible reasons for error: - The local player user account is not allowed to add friends - The device is not allowing outgoing traffic at the time of the operation
     */
    presentFriendRequestCreatorFromWindow$error$(window: _NSWindow | null, error: NobjcObject | null): boolean;
    /**
     * Asynchronously fetch saved games. The handler is called with an array of GKSavedGame objects or an error. If there is more than one saved game with the same name then a conflict exists. The application should determine the correct data to use and call resolveConflictingSavedGames:withData:completionHandler:. This may require data merging or asking the user.
     */
    fetchSavedGamesWithCompletionHandler$(handler: ((savedGames: _NSArray, error: _NSError) => void) | null): void;
    /**
     * Asynchronously save game data. If a saved game with that name already exists it is overwritten, otherwise a new one is created. The completion handler is called with the new / modified GKSavedGame or an error. If the saved game was in conflict then the overwritten version will be the one with the same deviceName if present, otherwise the most recent overall.
     */
    saveGameData$withName$completionHandler$(data: _NSData, name: _NSString, handler: ((savedGame: _GKSavedGame, error: _NSError) => void) | null): void;
    /**
     * Asynchronously delete saved games with the given name. The completion handler will indicate whether or not the deletion was successful.
     */
    deleteSavedGamesWithName$completionHandler$(name: _NSString, handler: ((error: _NSError) => void) | null): void;
    /**
     * Asynchronously resolve a saved game conflict. This deletes all versions included in conflictingSavedGames and creates a new version with the given data. The completion handler is called with the newly created save and all other remaining versions or an error.
     */
    resolveConflictingSavedGames$withData$completionHandler$(conflictingSavedGames: _NSArray, data: _NSData, handler: ((savedGames: _NSArray, error: _NSError) => void) | null): void;
    /** Authentication state */
    authenticated(): boolean;
    /** Indicates if a player is under age */
    underage(): boolean;
    /**
     * A Boolean value that declares whether or not multiplayer gaming is restricted on this device.
     */
    multiplayerGamingRestricted(): boolean;
    /**
     * A Boolean value that declares whether personalized communication is restricted on this device. If it is restricted, the player will not be able to read or write personalized messages on game invites, challenges, or enable voice communication in multiplayer games. Note: this value will always be true when isUnderage is true.
     */
    personalizedCommunicationRestricted(): boolean;
    /**
     * Array of player identifiers of friends for the local player. Not valid until loadFriendsWithCompletionHandler: has completed.
     * @deprecated Use ``GKLocalPlayer/loadFriendPlayers(completionHandler:)`` instead.
     */
    friends(): _NSArray;
    authenticateHandler(): ((arg0: _NSViewController, arg1: _NSError) => void) | null;
    setAuthenticateHandler$(value: ((arg0: _NSViewController, arg1: _NSError) => void) | null): void;
    /**
     * observable property that becomes true when the friend request view controller is displayed. It becomes false when it is dismissed
     */
    isPresentingFriendRequestViewController(): boolean;
}
export interface _GKLocalPlayer extends _GKSavedGameListener {
}
