import { PropertyValues, TemplateResult } from "lit";
import "@openremote/or-components/or-panel";
import "@openremote/or-translate";
import { Store } from "@reduxjs/toolkit";
import { AppStateKeyed, Page, PageProvider } from "@openremote/or-app";
import { Role, User, UserAssetLink, UserSession } from "@openremote/model";
import { OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";
import { GenericAxiosResponse } from "@openremote/rest";
import { OrMwcTableRowClickEvent, TableColumn, TableRow } from "@openremote/or-mwc-components/or-mwc-table";
export declare function pageUsersProvider(store: Store<AppStateKeyed>): PageProvider<AppStateKeyed>;
export interface UserModel extends User {
    password?: string;
    loaded?: boolean;
    loading?: boolean;
    previousRoles?: string[];
    roles?: string[];
    previousRealmRoles?: string[];
    realmRoles?: string[];
    previousAssetLinks?: UserAssetLink[];
    userAssetLinks?: UserAssetLink[];
}
export declare class PageUsers extends Page<AppStateKeyed> {
    static get styles(): import("lit").CSSResult[];
    realm?: string;
    userId?: string;
    creationState?: {
        userModel: UserModel;
    };
    protected _users: UserModel[];
    protected _serviceUsers: UserModel[];
    protected _userFilter: (users: UserModel[]) => UserModel[];
    protected _serviceUserFilter: (users: UserModel[]) => UserModel[];
    protected _passwordPolicy: string[];
    protected _roles: Role[];
    protected _realmRoles: string[];
    protected _registrationEmailAsUsername: boolean;
    protected _compositeRoles: Role[];
    protected _loadDataPromise?: Promise<any>;
    protected _saveUserPromise?: Promise<any>;
    private _sessionLoader?;
    get name(): string;
    shouldUpdate(changedProperties: PropertyValues): boolean;
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected responseAndStateOK(stateChecker: () => boolean, response: GenericAxiosResponse<any>, errorMsg: string): boolean;
    protected loadData(): Promise<void>;
    protected fetchUsers(): Promise<void>;
    private _createUpdateUser;
    /**
     * Backend only uses name of role not the ID so although service client roles are not the same as composite roles
     * the names will match so that's ok
     */
    private _updateRoles;
    private _updateUserAssetLinks;
    private _deleteUser;
    private doDelete;
    protected render(): TemplateResult | void;
    protected getUsersTable(columns: TemplateResult | TableColumn[] | string[], rows: TemplateResult | TableRow[] | string[][], config: any, onRowClick: (event: OrMwcTableRowClickEvent) => void): Promise<TemplateResult>;
    protected getNewUserModel(serviceAccount: boolean): UserModel;
    protected getDefaultUserFilter(serviceUser: boolean): (users: UserModel[]) => UserModel[];
    protected onRegularUserSearch(ev: InputEvent): void;
    protected onServiceUserSearch(ev: InputEvent): void;
    protected loadUser(user: UserModel): Promise<void>;
    protected _openAssetSelector(ev: MouseEvent, user: UserModel, readonly: boolean, suffix: string): void;
    protected onUserChanged(suffix: string): void;
    protected _onPasswordChanged(user: UserModel, suffix: string): void;
    protected _regenerateSecret(ev: OrInputChangedEvent, user: UserModel, secretInputId: string): Promise<void>;
    protected _updateUserSelectedRoles(user: UserModel, suffix: string): void;
    protected getImplicitUserRoles(user: UserModel): string[];
    protected getSingleUserView(user: UserModel, compositeRoleOptions: string[], realmRoleOptions: [string, string][], suffix: string, readonly?: boolean): TemplateResult;
    protected getMQTTSessionTemplate(user: UserModel): TemplateResult;
    protected getSessionLoader(user: UserModel): Promise<TemplateResult>;
    protected getSingleUserTemplate(user: UserModel, compositeRoleOptions: string[], realmRoleOptions: [string, string][], suffix: string, readonly?: boolean): TemplateResult;
    protected _getPasswordPolicyTemplate(user: UserModel, passwordPolicy?: string[]): Promise<TemplateResult>;
    protected reset(): void;
    stateChanged(state: AppStateKeyed): void;
    protected _updateRoute(silent?: boolean): void;
    protected _updateNewUserRoute(silent?: boolean): void;
    protected disconnectSession(user: UserModel, session: UserSession): void;
}
