import { AbstractProtection, EDStatic, OwnLifetime, ProtectedRoomsSet, Protection, ProtectionDescription, RoomEvent, RoomMessageSender, UserConsequences } from "matrix-protection-suite";
import { Draupnir } from "../Draupnir";
import { MatrixRoomID } from "@the-draupnir-project/matrix-basic-types";
import { LeakyBucket } from "../queues/LeakyBucket";
import { Result } from "@gnuxie/typescript-result";
declare const MembershipChangeProtectionSettings: import("@sinclair/typebox").TObject<{
    maxChangesPerUser: import("@sinclair/typebox").TInteger;
    timescaleMinutes: import("@sinclair/typebox").TInteger;
    finalConsequenceReason: import("@sinclair/typebox").TString;
    warningText: import("@sinclair/typebox").TString;
}>;
type MembershipChangeProtectionSettings = EDStatic<typeof MembershipChangeProtectionSettings>;
export type MembershipChangeProtectionDescription = ProtectionDescription<Draupnir, typeof MembershipChangeProtectionSettings, MembershipChangeProtectionCapabilities>;
export declare class MembershipChangeProtection extends AbstractProtection<MembershipChangeProtectionDescription> implements Protection<MembershipChangeProtectionDescription> {
    private readonly messageSender;
    readonly settings: MembershipChangeProtectionSettings;
    private readonly finalConsequences;
    readonly changeBucket: LeakyBucket<string>;
    private readonly consequenceBucket;
    private readonly warningThreshold;
    constructor(description: MembershipChangeProtectionDescription, lifetime: OwnLifetime<Protection<MembershipChangeProtectionDescription>>, capabilities: MembershipChangeProtectionCapabilities, protectedRoomsSet: ProtectedRoomsSet, messageSender: RoomMessageSender, settings: MembershipChangeProtectionSettings);
    handleTimelineEvent(room: MatrixRoomID, event: RoomEvent): Promise<Result<void>>;
    handleProtectionDisable(): void;
    private timescaleMilliseconds;
}
export type MembershipChangeProtectionCapabilities = {
    finalConsequences: UserConsequences;
};
export {};
//# sourceMappingURL=MembershipChangeProtection.d.ts.map