import { AnyToken } from "../../exports";
import { DesignSystemCollection } from "../../model/base/SDKDesignSystemCollection";
import { ElementDataView } from "../../model/elements/SDKElementDataView";
import { ElementDataViewColumn } from "../../model/elements/SDKElementDataViewColumn";
import { ElementProperty, ElementPropertyCreationModel, ElementPropertyUpdateModel } from "../../model/elements/SDKElementProperty";
import { ElementPropertyValue } from "../../model/elements/values/SDKElementPropertyValue";
import { TokenType } from "../../model/enums/SDKTokenType";
import { TokenGroup } from "../../model/groups/SDKTokenGroup";
import { TokenTheme } from "../../model/themes/SDKTokenTheme";
import { Token } from "../../model/tokens/SDKToken";
import { TokenTypeMapToken } from "../../utils/TokenUtils";
import { DataCore } from "../data/SDKDataCore";
import { AreaTokenValues } from "./SDKAreaTokenValues";
import { RemoteBrandIdentifier, RemoteVersionIdentifier } from "./SDKRemoteIdentifiers";
export declare class AreaTokens {
    /** Internal: Engine */
    private dataCore;
    /** Update helpers for everything token related */
    values: AreaTokenValues;
    constructor(dataCore: DataCore);
    /** Fetches all remote tokens in the version
     * @param from - Remote version to fetch from
     * @param filter - Optional filter to apply. Multiple filters can be used at once
     * @param filter.type - When provided, only tokens of the specified type will be returned
     * @param filter.brandId - When provided, only tokens of the specified brand will be returned
     * @returns Tokens in the specified version with filter applied
     */
    getTokens(from: RemoteVersionIdentifier, filter?: {
        type?: TokenType;
        brandId?: string;
    }): Promise<Array<Token>>;
    /** Retrieves all occurances of the specified token in the version - its usages in other tokens, components and documentation pages
     * @param from - Remote version to fetch from
     * @param idInVersion - Token to check for references
     * @returns Persistent identifiers of tokens, components, documentation pages that contain the specified token
     */
    getTokenUsage(from: RemoteVersionIdentifier, idInVersion: string): Promise<{
        tokens: Array<string>;
        components: Array<string>;
        documentationPages: Array<string>;
    }>;
    /** Fetches all remote token groups in this version
     * @param from - Remote version to fetch from
     * @param filter - Optional filter to apply. Multiple filters can be used at once
     * @param filter.type - When provided, only token groups of the specified type will be returned
     * @param filter.brandId - When provided, only token groups of the specified brand will be returned
     * @returns Token groups in the specified version with filter applied
     */
    getTokenGroups(from: RemoteVersionIdentifier, filter?: {
        type?: TokenType;
        brandId?: string;
    }): Promise<Array<TokenGroup>>;
    /** Fetches all remote themes in the version
     * @param from - Remote version to fetch from
     * @returns All themes in the specified version
     */
    getTokenThemes(from: RemoteVersionIdentifier, filter?: {
        brandId?: string;
    }): Promise<Array<TokenTheme>>;
    /** Retrieves all remote property definitions for tokens
     * @param from - Remote version to fetch from
     * @returns All property definitions in the specified version
     */
    getTokenProperties(from: RemoteVersionIdentifier): Promise<Array<ElementProperty>>;
    /** Retrieves all remote property definitions for tokens
     * @param from - Remote version to fetch from
     * @returns All property definitions in the specified version
     */
    getTokenPropertyValues(from: RemoteVersionIdentifier): Promise<Array<ElementPropertyValue>>;
    /** Retrieves all remote property views for tokens
     * @param from - Remote version to fetch from
     * @returns All property views in the specified version
     */
    getTokenDataViews(from: RemoteVersionIdentifier): Promise<Array<ElementDataView>>;
    /** Retrieves all token collections
     * @param from - Remote version to fetch from
     * @returns All token collections in the specified version
     */
    getTokenCollections(from: RemoteVersionIdentifier): Promise<Array<DesignSystemCollection>>;
    /** Creates remote token. This method can only be used once per token and will assign persistent id to the token. Calling this version on token that already has id assigned will result in error
     * @param to - Remote version to write to
     * @param token - Token to create
     * @param parentId - Id of the group to add the token to. This is id of the group, not the versioned id
     * @returns New remote token ids
     */
    createToken(to: RemoteVersionIdentifier, token: Token, parentId: string): Promise<{
        id: string;
        idInVersion: string;
    }>;
    /** Creates local token. This token doesn't have id associated with it on remote, and must be created once with `createToken` to be stored in design system
     * @param tokenType - Type of token to create
     * @returns New token of the specified type, filled with default values
     */
    createLocalToken<T extends TokenType>(tokenType: T, versionId: string, brandId: string, properties: Array<ElementProperty>): TokenTypeMapToken[T];
    /** Creates local token override. This theme override doesn't have id associated with it on remote, and must be created once with `createThemeOverride` to be stored in design system
     * @param tokenType - Type of token to create
     * @returns New token of the specified type, filled with default values
     */
    createLocalThemeOverride<T extends AnyToken>(theme: TokenTheme, baseToken: T): T;
    /** Creates remote token group. This method can only be used once per group and will assign persistent id to the group. Calling this version on group that already has id assigned will result in error
     * @param to - Remote version to write to
     * @param group - Group to create
     * @param parentId - Id of the group to add the group to. This is id of the group, not the versioned id
     * @returns New remote token group ids
     */
    createTokenGroup(to: RemoteVersionIdentifier, group: TokenGroup, parentId: string): Promise<{
        id: string;
        idInVersion: string;
    }>;
    /** Creates local token group. This group doesn't have id associated with it on remote, and must be created once with `createTokenGroup` to be stored in design system
     * @param tokenType - Type of token to create the group for
     * @param versionId - Id of the version to create the group in
     * @param brandId - Id of the brand to create the group in
     * @returns New group with id assigned
     */
    createLocalTokenGroup(tokenType: TokenType, versionId: string, brandId: string): TokenGroup;
    /** Updates remote token. This method can only be used on tokens that already exist in the version
     * @param to - Remote version to write to
     * @param token - Token to update
     * @returns Nothing
     */
    updateToken(to: RemoteVersionIdentifier, token: Token): Promise<void>;
    /** Updates remote token groups. This method can only be used on token groups that already exist in the version
     * @param to - Remote version to write to
     * @param group - Token group to update
     * @returns Nothing
     */
    updateTokenGroup(to: RemoteVersionIdentifier, group: TokenGroup): Promise<void>;
    /** Updates remote token property value. This also creates the property value if it doesn't exist
     * @param to - Remote version to write to
     * @param newValue - Value to set - this can be multiple things, from ID to raw string value to others
     * @param forToken - Token to assign the value to
     * @param forProperty - Property to assign the value to
     */
    updateTokenPropertyValue(to: RemoteVersionIdentifier, newValue: string, forToken: Token, forProperty: ElementProperty): Promise<void>;
    /** Deletes remote token property value
     * @param to - Remote version to write to
     * @param valueId - Value identifier
     */
    deleteTokenPropertyValue(to: RemoteVersionIdentifier, valueId: string): Promise<void>;
    /** Create token property
     * @param to - Remote version to write to
     * @param model - Property creation model to create the property from
     */
    createTokenProperty(to: RemoteVersionIdentifier, model: ElementPropertyCreationModel): Promise<{
        id: string;
        idInVersion: string;
    }>;
    /** Update token property
     * @param to - Remote version to write to
     * @param propertyIdInVersion - Remote element property to update
     * @param model - Property update model to apply to property
     */
    updateTokenProperty(to: RemoteVersionIdentifier, propertyIdInVersion: string, model: ElementPropertyUpdateModel): Promise<void>;
    /** Delete token property. This will remove all values associated with the property
     * @param to - Remote version to write to
     * @param propertyIdInVersion - Id of the property to delete
     */
    deleteTokenProperty(to: RemoteVersionIdentifier, propertyIdInVersion: string): Promise<void>;
    /** Resize specific token column
     * @param to - Remote version to write to
     * @param columnIdInVersion - Id of the column to update
     * @param newWidth - New width of the column
     */
    updateResizeTokenColumn(to: RemoteVersionIdentifier, view: ElementDataView, column: ElementDataViewColumn, newWidth: number): Promise<void>;
    /** Move column to a new index and reorder all other columns around it
     * @param to - Remote version to write to
     * @param colum - Column object to move
     * @param newIndex - New index to move the token to
     */
    updateReorderTokenColumn(to: RemoteVersionIdentifier, view: ElementDataView, column: ElementDataViewColumn, newIndex: number): Promise<void>;
    /** Creates local token theme. This group doesn't have id associated with it on remote, and must be created once with `createTokenTheme` to be stored in design system
     * @param versionId - Id of the version to create the theme in
     * @param brandId - Id of the brand to create the theme in
     * @returns New group with id assigned
     */
    createLocalTokenTheme(versionId: string, brandId: string): TokenTheme;
    /** Creates remote token theme. This method can only be used once per theme and will assign persistent id to the theme. Calling this version on theme that already has id assigned will result in error
     * @param to - Remote version to write to
     * @param theme - Theme to create
     * @returns New remote theme ids
     */
    createTokenTheme(to: RemoteVersionIdentifier, theme: TokenTheme): Promise<{
        id: string;
        idInVersion: string;
    }>;
    /** Updates token theme. This method can only be used on themes that already exist in the version
     * @param to - Remote version to write to
     * @param theme - Token theme to update
     * @returns Nothing
     */
    updateTokenTheme(to: RemoteVersionIdentifier, theme: TokenTheme): Promise<void>;
    /** Deletes remote token. Calling this method on token that doesn't exist in the version will result in error
     * @param to - Remote version to write to
     * @param tokenIdInVersion - Token idInVersion to delete
     * @returns Nothing
     */
    deleteToken(to: RemoteVersionIdentifier, tokenIdInVersion: string): Promise<void>;
    /** Deletes remote token group. This method will also fix the token group tree by moving any subgroups to parent - do note it will NOT delete contents of the group. Calling this method on group that doesn't exist in the version will result in error
     * @param to - Remote version to write to
     * @param tokenGroupIdInVersion - Token group idInVersion to delete
     * @returns Nothing
     */
    ungroupTokenGroup(to: RemoteVersionIdentifier, tokenGroupIdInVersion: string): Promise<void>;
    /** Deletes remote token group and all its descendants. All items (groups and tokens) underneath will be deleted. Calling this method on group that doesn't exist in the version will result in error
     * @param to - Remote version to write to
     * @param tokenGroupToDelete - Token group to delete
     * @param tokens - All available tokens
     * @param tokenGroups - All available token groups
     * @returns Nothing
     */
    deleteTokenGroup(to: RemoteVersionIdentifier, tokenGroupToDelete: TokenGroup, tokens: Array<Token>, tokenGroups: Array<TokenGroup>): Promise<void>;
    /** Deletes remote token theme. This method will also remove all theme overrides and disconnect theme from assigned column, all of which will be updated
     * @param to - Remote version to write to
     * @param idInVersion - Theme idInVersion to delete
     * @returns Nothing
     */
    deleteTokenTheme(to: RemoteVersionIdentifier, idInVersion: string): Promise<void>;
    /** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write tokens in bulk */
    writeTokens(to: RemoteVersionIdentifier, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>, deleteTokenGroups: Array<TokenGroup>): Promise<void>;
    /** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write theme in bulk */
    writeTheme(to: RemoteVersionIdentifier, theme: TokenTheme): Promise<void>;
    /** Resolves tokens by applying themes to them and retrieves new token set where values correctly correspond to that theme */
    computeTokensByApplyingThemes(allTokens: Array<Token>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
    computeInnerReferencesByApplyingThemesEfficient(tokensIndex: Map<string, Token>, themeOverridesIndex: Record<string, Map<string, Token>>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
    private computeSingleTokenValueFromReferenceByApplyingThemes;
    computeTokensByApplyingThemesEfficient(tokensIndex: Map<string, Token>, themeOverridesIndex: Record<string, Map<string, Token>>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
    /** Separates groups by types */
    computeGroupTrees(groups: Array<TokenGroup>): Promise<Map<TokenType, Array<TokenGroup>>>;
    /** Get determistic mocked token data. Must be used with mocked token groups */
    getMockedTokens(from: RemoteBrandIdentifier): Promise<Array<Token>>;
    /** Get determistic mocked token group data. Must be used with mocked tokens */
    getMockedTokenGroups(from: RemoteBrandIdentifier): Promise<Array<TokenGroup>>;
    /** Get determistic mocked token data views. Must be used with mocked tokens */
    getMockedTokenDataViews(from: RemoteVersionIdentifier): Promise<Array<ElementDataView>>;
}
