import { LitElement, PropertyValues } from 'lit';
import { ContextConsumer } from '@lit/context';
import { WeavyComponentSettingsType, WeavyComponentSettings } from '../contexts/settings-context';
import { WeavyType } from '../contexts/weavy-context';
import { UserType } from '../types/users.types';
import { AppType } from '../contexts/app-context';
import { ComponentFeaturePolicy } from '../contexts/features-context';
import { AppTypeString, AppTypeGuid, ComponentType, LinkType, AgentAppTypeGuidMapping, AgentAppTypeStringMapping } from '../types/app.types';
import { NotificationsAppearanceType, NotificationsBadgeType } from '../types/notifications.types';
import { WyLinkEventType, WyNotificationEventType } from '../types/notifications.events';
import { ContextDataBlobsType, ContextDataType } from '../types/context.types';
import { ContextIdType } from '../contexts/context-id-context';
export interface WeavyComponentProps {
    /**
     * Any app type for the weavy component.
     */
    componentType?: AppTypeGuid | ComponentType;
    /**
     * Any app types handled by the component.
     */
    appTypes?: AppTypeGuid[];
    /**
     * Unique identifier or app id for the weavy component.
     * The unique identifier should correspond to the uid of the app created using the server-to-server Web API.
     */
    uid?: string | number | null;
    /**
     * Optional display name for the weavy component.
     * The name will be updated on the server or fetched from the server for weavy components with a componentType.
     */
    name?: string | null;
    /**
     * The configured uid of the agent for the weavy component.
     */
    agent?: string | null;
    /**
     * Array with any contextual data. The data is uploaded upon change.
     *
     * *Note: Only the first item in the array is currently used.*
     */
    data?: ContextDataType[];
    /**
     * Sets the uid property with automatically appended user and agent name (where applicable).
     */
    autoUid?: string | null;
    /**
     * It sets the component to it's initial state and resets the app state.
     */
    reset: () => void;
}
export interface WeavyComponentSettingProps {
    /**
     * Appearance of the built in notifications.
     */
    notifications: NotificationsAppearanceType;
    /**
     * Appearance of the notifications badge.
     */
    notificationsBadge: NotificationsBadgeType;
    /**
     * A space separated string of available reaction emojis in unicode.
     */
    reactions: string;
}
export interface WeavyComponentFeatureProps {
    /**
     * Config for only enabling specific features in the weavy component.
     */
    features?: string;
}
export interface WeavyComponentContextProps {
    /**
     * The app data.
     */
    app: AppType | undefined;
    /**
     * Resolves when app data is available.
     */
    whenApp: () => Promise<AppType>;
    /**
     * Uploaded context data blob ids.
     */
    contextDataBlobs: ContextDataBlobsType | undefined;
    /**
     * Resolves when context data blob uploads has finished.
     */
    whenContextDataBlobs: () => Promise<ContextDataBlobsType>;
    /**
     * Contextual guid that is unique for the client context.
     */
    contextId: ContextIdType | undefined;
    /**
     * Resolves when a contextual id is available.
     */
    whenContextId: () => Promise<ContextIdType>;
    /**
     * Policy for checking which features are available.
     */
    componentFeatures: ComponentFeaturePolicy | undefined;
    /**
     * Resolves when weavy component features config is available.
     */
    whenComponentFeatures: () => Promise<ComponentFeaturePolicy>;
    /**
     * Any provided link that should be loaded, shown and highlighted.
     */
    link: LinkType | undefined;
    /**
     * Resolves when a provided link is available.
     */
    whenLink: () => Promise<LinkType>;
    /**
     * The weavy component settings provided as a context on the component.
     */
    settings: WeavyComponentSettingsType | undefined;
    /**
     * Resolves when weavy component settings are available.
     */
    whenSettings: () => Promise<WeavyComponentSettingsType>;
    /**
     * The current user.
     */
    user: UserType | undefined;
    /**
     * Resolves when current user data is available.
     */
    whenUser: () => Promise<UserType>;
    /**
     * The consumed weavy context.
     */
    weavy: WeavyType | undefined;
    /**
     * Resolves when a weavy context is available.
     * @function
     */
    whenWeavy: () => Promise<WeavyType>;
}
/**
 * Base class for exposed/public weavy components. This class provides common external properties and internal data provided as contexts for sub components.
 */
export declare class WeavyComponent extends LitElement implements WeavyComponentProps, WeavyComponentContextProps, WeavyComponentSettingProps, WeavyComponentFeatureProps {
    #private;
    protected storage: Storage | undefined;
    weavyContextConsumer?: ContextConsumer<{
        __context__: WeavyType;
    }, this>;
    weavy: WeavyType | undefined;
    app: AppType | undefined;
    contextDataBlobs: ContextDataBlobsType | undefined;
    contextId: ContextIdType;
    componentFeatures: ComponentFeaturePolicy | undefined;
    settings: WeavyComponentSettingsType;
    user: UserType | undefined;
    reset(): void;
    /**
     * Checks if an Entity is matching the component.
     *
     * @param {EntityType} link Entity to check for match
     * @returns { boolean } True if the entity is matching the component
     */
    matchesLink(link?: LinkType): boolean;
    private _link;
    get link(): LinkType | undefined;
    set link(link: LinkType | undefined);
    /**
     * Clears the link and resets the promise.
     */
    protected clearLink(): void;
    /**
     * Shares a link with other blocks that may consume it automatically.
     *
     * @param {LinkType} link - The entity to provide
     */
    protected provideStorageLink(link: LinkType): void;
    /**
     * Reads a link from storage provides it in the .link property/context.
     */
    protected readStorageLink(): void;
    /**
     * Consumes a link in the storage. Make sure to consume it after it has been used.
     */
    protected consumeStorageLink(): void;
    protected storageLinkHandler: (e: StorageEvent) => void;
    protected linkEventHandler: (e: WyLinkEventType) => Promise<void>;
    protected notificationEventHandler: (e: WyNotificationEventType) => void;
    componentType?: AppTypeGuid | ComponentType;
    appTypes?: AppTypeGuid[];
    features?: string;
    protected _agentUid?: string;
    get agent(): string | undefined;
    set agent(agent: string | undefined);
    data?: ContextDataType[];
    autoUid?: string | null;
    uid?: string | number | null;
    private _initialAppName?;
    private _appName?;
    set name(name: string | undefined);
    get name(): string | undefined;
    set notifications(notifications: NotificationsAppearanceType);
    get notifications(): NotificationsAppearanceType;
    set notificationsBadge(notificationsBadge: NotificationsBadgeType);
    get notificationsBadge(): NotificationsBadgeType;
    set reactions(reactions: string);
    get reactions(): string;
    whenApp(): Promise<AppType>;
    whenContextDataBlobs(): Promise<ContextDataBlobsType>;
    whenContextId(): Promise<string>;
    whenComponentFeatures(): Promise<ComponentFeaturePolicy>;
    whenLink(): Promise<LinkType>;
    whenSettings(): Promise<WeavyComponentSettings>;
    whenUser(): Promise<UserType>;
    whenWeavy(): Promise<WeavyType>;
    /**
     * @deprecated Use agent property instead.
     */
    bot?: string;
    constructor();
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected scheduleUpdate(): Promise<void>;
    protected willUpdate(changedProperties: PropertyValues): Promise<void>;
}
/** Map for all app type guids. Returns app type string. */
export declare const AppTypeGuids: Map<"d65dd4bc-418e-403c-9f56-f9cf4da931ed" | "88f96a08-c6c1-4eac-a0bd-5bf8fba1a3fd" | "523edd88-4bbf-4547-b60f-2859a6d2ddc1" | "5ebfa152-de85-48da-82dd-30a1b560c313" | "edb400ac-839b-45a7-b2a8-6a01820d1c44" | "7e14f418-8f15-46f4-b182-f619b671e470" | "2352a1c6-abc6-420e-8b85-ca7d5aed8779", AppTypeString>;
/** Map for all app type strings. Returns app type guid. */
export declare const AppTypeStrings: Map<"posts" | "comments" | "chat" | "files" | "chat_room" | "private_chat" | "agent_chat", AppTypeGuid>;
/** Map for all agent app type guids. Returns app type string. */
export declare const AgentAppTypeGuids: Map<string, (typeof AgentAppTypeGuidMapping)["2352a1c6-abc6-420e-8b85-ca7d5aed8779"]>;
/** Map for all agent app type strings. Returns app type guid. */
export declare const AgentAppTypeStrings: Map<string, AgentAppTypeStringMapping.agent_chat>;
//# sourceMappingURL=weavy-component.d.ts.map