/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { getShadowElement } from '@tylertech/forge-core';
import { BaseAdapter } from '../core/base/base-adapter';
import { BACKDROP_CONSTANTS } from './backdrop-constants';
/**
 * Provides facilities for interacting with the internal DOM of `BackdropComponent`.
 */
export class BackdropAdapter extends BaseAdapter {
    constructor(component) {
        super(component);
        this._backdropElement = getShadowElement(component, BACKDROP_CONSTANTS.selectors.CONTAINER);
    }
    /**
     * Sets the backdrop element opacity.
     * @param opacity The opacity amount.
     */
    setBackdropOpacity(opacity) {
        this._backdropElement.style.opacity = opacity.toString();
    }
    /**
     * Adds a click event to the backdrop container element.
     * @param type The event type.
     * @param listener The event listener.
     */
    addBackdropEventListener(type, listener) {
        this._backdropElement.addEventListener('click', listener);
    }
    /**
     * Removes a click event from the backdrop container element.
     * @param type The event type.
     * @param listener The event listener.
     */
    removeBackdropEventListener(type, listener) {
        this._backdropElement.removeEventListener('click', listener);
    }
}
