import { PropertyValues, TemplateResult } from "lit";
import { AppStateKeyed, Page, PageProvider } from "@openremote/or-app";
import { Store } from "@reduxjs/toolkit";
import { AlarmAssetLink, AlarmSeverity, AlarmStatus, Asset, SentAlarm, User } from "@openremote/model";
import { GenericAxiosResponse } from "@openremote/rest";
import { OrInputChangedEvent, OrMwcInput } from "@openremote/or-mwc-components/or-mwc-input";
import { OrMwcTable, OrMwcTableRowClickEvent, OrMwcTableRowSelectEvent } from "@openremote/or-mwc-components/or-mwc-table";
import "../components/alarms/or-alarms-table";
export interface PageAlarmsConfig {
    initialFilter?: string;
    initialSeverity?: AlarmSeverity;
    assignOnly?: boolean;
}
export declare function pageAlarmsProvider(store: Store<AppStateKeyed>, config?: PageAlarmsConfig): PageProvider<AppStateKeyed>;
interface AlarmModel extends SentAlarm {
    loaded?: boolean;
    loading?: boolean;
    alarmAssetLinks?: AlarmAssetLink[];
    previousAssetLinks?: AlarmAssetLink[];
}
export declare class PageAlarms extends Page<AppStateKeyed> {
    static get styles(): import("lit").CSSResult[];
    config?: PageAlarmsConfig;
    realm?: string;
    alarm?: AlarmModel;
    creationState?: {
        alarmModel: AlarmModel;
    };
    protected _alarms: AlarmModel[];
    protected _linkedAssets: Asset[];
    protected _linkedUsers: User[];
    protected _loadedUsers: User[];
    protected _loading: boolean;
    severity?: AlarmSeverity;
    status?: AlarmStatus;
    assign: boolean;
    allActive: boolean;
    protected _data?: SentAlarm[];
    protected _loadAlarmsPromise?: Promise<any>;
    protected _saveAlarmPromise?: Promise<any>;
    protected _loadUsersPromise?: Promise<any>;
    protected _tableElem: HTMLDivElement;
    protected _table?: OrMwcTable;
    protected _refresh?: number;
    protected _selectedIds?: number[];
    get statusValue(): string;
    get severityValue(): string;
    get name(): string;
    constructor(store: Store<AppStateKeyed>);
    connectedCallback(): void;
    shouldUpdate(changedProperties: PropertyValues): boolean;
    protected responseAndStateOK(stateChecker: () => boolean, response: GenericAxiosResponse<any>, errorMsg: string): boolean;
    protected _createUpdateAlarm(alarm: AlarmModel, action: "update" | "create"): Promise<void>;
    protected render(): TemplateResult<1>;
    protected getNewAlarmModel(): AlarmModel;
    protected loadAlarm(alarm: AlarmModel): Promise<void>;
    protected getAlarmsTable(writeAlarms: boolean): TemplateResult<1>;
    protected _loadData(): Promise<void>;
    private _deleteAlarm;
    private _deleteAlarms;
    private doDelete;
    private doMultipleDelete;
    protected getSingleAlarmView(alarm: AlarmModel, readonly?: boolean): TemplateResult;
    protected getSingleAlarmTemplate(alarm: AlarmModel, readonly?: boolean): TemplateResult;
    protected _getStatusOptions(): {
        label: string;
        value: string;
    }[];
    protected _getSeverityOptions(): {
        label: string;
        value: string;
    }[];
    protected _getAddStatusOptions(): {
        label: string;
        value: AlarmStatus;
    }[];
    protected _getAddSeverityOptions(): {
        label: string;
        value: AlarmSeverity;
    }[];
    protected _getSourceText(): string;
    protected _onSeverityChanged(severity: any): void;
    protected _onAssignCheckChanged(assign: boolean): Promise<void>;
    protected _onStatusChanged(status: any): void;
    protected _onRowSelect(ev: OrMwcTableRowSelectEvent): void;
    protected _onRowClick(ev: OrMwcTableRowClickEvent): void;
    protected _getUsers(): {
        value: string;
        label: string;
    }[];
    protected _openAssetSelector(ev: MouseEvent, alarm: AlarmModel, readonly: boolean): void;
    protected reset(): void;
    stateChanged(state: AppStateKeyed): void;
    protected _updateRoute(silent?: boolean): void;
    protected onAlarmChanged(e: OrInputChangedEvent | OrMwcInput): void;
}
export {};
//# sourceMappingURL=page-alarms.d.ts.map