/* eslint-disable @typescript-eslint/no-unnecessary-condition */
// #region Imports
import { PureEventEmitter } from '@breadstone/mosaik-elements';
// #endregion
/**
 * The abstract `ElementIntlBase` class.
 *
 * @public
 */
export class ElementIntlBase {
    // #region Fields
    _changed;
    _locale;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `CaptchaElementIntl` class.
     *
     * @protected
     */
    constructor(locale) {
        this._locale = locale ?? 'default';
        this._changed = new PureEventEmitter();
    }
    // #endregion
    // #region Properties
    /**
     * Gets or sets the `locale` property.
     *
     * @public
     */
    get locale() {
        return this._locale;
    }
    set locale(value) {
        if (this._locale !== value) {
            this._locale = value ?? 'default';
            this.onLocaleChanged?.();
        }
    }
    /**
     * Stream to emit from when labels are changed. Use this to notify components when the labels have
     * changed after initialization.
     *
     * @public
     * @readonly
     */
    get changes() {
        return this._changed;
    }
}
//# sourceMappingURL=ElementIntlBase.js.map