import type { Form, UIEvent } from '@devvit/protos';
import type { Severity } from '@reddit/faceplate/types.js';
import type { ReactiveController, ReactiveElement } from 'lit';
import type { ParentWindowInfo } from '../../types/parent-window.js';
import type { DevvitUIEffectEvent } from '../dispatcher/events.js';
export type EffectMessage = {
    onEvent?(event: UIEvent): void;
} & ({
    effectName: 'devvit:formEffect';
    form: Form;
} | {
    effectName: 'devvit:navigateToEffect';
    url: string;
} | {
    effectName: 'devvit:toastEffect';
    message: string;
    level: Severity;
});
/** Manages communications to the devvit-ui-effect Event bus. */
export declare abstract class EffectHandler implements ReactiveController {
    #private;
    protected readonly host: ReactiveElement;
    constructor(host: ReactiveElement);
    hostConnected(): void;
    hostDisconnected(): void;
    /** @arg ev any devvit-ui-effect event. The subclass must filter. */
    protected abstract onEvent(ev: DevvitUIEffectEvent): void;
}
/**
 * postMessage() to a specified window and host origin. Most commonly used in
 * iframe situations, so that effect details can be sent to the iframe parent,
 * instead of the iframe window itself.
 *
 * Currently only used by
 * [d2x](https://github.snooguts.net/reddit/reddit-desktop/blob/598aedf/src/reddit/components/DevvitCustomPost/index.tsx#L116)
 * but you can't delete this since it'll run @devvit/ui-renderer@next.
 *
 * @internal
 */
export declare function postEffectToWindow(parent: ParentWindowInfo, msg: EffectMessage): void;
//# sourceMappingURL=effect-handler.d.ts.map