/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { getShadowElement } from '@tylertech/forge-core';
import { BaseAdapter } from '../core/base/base-adapter';
import { BANNER_CONSTANTS } from './banner-constants';
export class BannerAdapter extends BaseAdapter {
    constructor(component) {
        super(component);
        this._rootElement = getShadowElement(component, BANNER_CONSTANTS.selectors.BANNER);
    }
    addRootClass(name) {
        this._rootElement.classList.add(name);
    }
    removeRootClass(name) {
        this._rootElement.classList.remove(name);
    }
    addDismissButtonAttribute(name, value = '') {
        this.forgeIconButtonDismiss.setAttribute(name, value);
    }
    removeDismissButtonAttribute(name) {
        this.forgeIconButtonDismiss.removeAttribute(name);
    }
    addDismissEventListener(event, callback) {
        this.buttonDismiss.addEventListener(event, callback);
    }
    removeDismissEventListener(event, callback) {
        this.buttonDismiss.removeEventListener(event, callback);
    }
    get forgeIconButtonDismiss() {
        if (!this._forgeIconButtonDismiss) {
            this._forgeIconButtonDismiss = getShadowElement(this._component, BANNER_CONSTANTS.selectors.FORGE_DISMISS_BUTTON);
        }
        return this._forgeIconButtonDismiss;
    }
    get buttonDismiss() {
        if (!this._buttonDismiss) {
            this._buttonDismiss = getShadowElement(this._component, BANNER_CONSTANTS.selectors.DISMISS_BUTTON);
        }
        return this._buttonDismiss;
    }
}
