import { TemplateResult, CSSResult } from "lit";
import "@openremote/or-components/or-panel";
import "@openremote/or-translate";
import { Store } from "@reduxjs/toolkit";
import { Page, PageProvider, AppStateKeyed } from "@openremote/or-app";
import { OrInputChangedEvent, OrMwcInput } from "@openremote/or-mwc-components/or-mwc-input";
import { Role, User, UserAssetLink } from "@openremote/model";
export declare function pageAccountProvider(store: Store<AppStateKeyed>): PageProvider<AppStateKeyed>;
interface UserModel extends User {
    password?: string;
    loaded?: boolean;
    loading?: boolean;
    previousRoles?: Role[];
    roles?: Role[];
    previousRealmRoles?: Role[];
    realmRoles?: Role[];
    previousAssetLinks?: UserAssetLink[];
    userAssetLinks?: UserAssetLink[];
}
export declare class PageAccount extends Page<AppStateKeyed> {
    protected static _getStyle(): CSSResult;
    protected _user?: UserModel;
    protected _dirty: boolean;
    protected _invalid: boolean;
    protected _passwordPolicy: string[];
    protected _passwordElem?: OrMwcInput;
    protected _repeatPasswordElem?: OrMwcInput;
    static get styles(): CSSResult;
    get name(): string;
    stateChanged(_state: AppStateKeyed): void;
    connectedCallback(): void;
    protected render(): TemplateResult | void;
    /**
     * Asynchronous function that returns the account settings template.
     * Will call {@link onchange} when an input field submits a new value.
     */
    protected _getAccountRowTemplate(user?: UserModel, readonly?: boolean, onchange?: (user: User, dirty: boolean, invalid: boolean) => void): Promise<TemplateResult>;
    /**
     * Asynchronous function that returns the actions template, such as the 'save' button.
     */
    protected _getActionsRowTemplate(user: UserModel): Promise<TemplateResult>;
    /**
     * HTML callback function when any of the password input fields change.
     * Checks whether {@link _passwordElem} and {@link _repeatPasswordElem} are the same,
     * and updates the {@link user} object with the new password.
     */
    protected _onPasswordChanged(user: UserModel): boolean;
    /**
     * HTML callback function for when the 'Save' button is clicked.
     * Checks if the input fields are valid, and calls the {@link _updateUser} function.
     */
    protected _onSaveBtnClick(_e: OrInputChangedEvent): void;
    /**
     * HTML callback function for when the 'Reset Password' button is clicked.
     */
    protected _onResetPasswordBtnClick(_e: OrInputChangedEvent): void;
    /**
     * Function that returns whether the input fields are all valid.
     * Listens for HTML elements with the 'validate' class.
     */
    protected _isInvalid(): boolean;
    /**
     * Function that returns if the input fields are 'dirty'. (if they have been changed by the user)
     */
    protected _isDirty(): boolean;
    /**
     * Function that fetches (and returns) the currently logged in {@link UserModel} from the Manager HTTP API.
     */
    protected _getUser(): Promise<UserModel>;
    /**
     * Function that updates the {@link UserModel} through the Manager HTTP API.
     * If the password has been changed, it will, after updating the user, also request to reset the password.
     */
    protected _updateUser(user: UserModel): Promise<void>;
    /**
     * Function that formats the password policy from the currently authenticated realm.
     */
    protected _getPasswordPolicy(): Promise<void>;
    /**
     * Function that formats the password policy into a displayable html format.
     */
    protected _getPasswordPolicyTemplate(user: UserModel, passwordPolicy?: string[]): Promise<TemplateResult>;
}
export {};
//# sourceMappingURL=page-account.d.ts.map