// #region Imports
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Attribute } from '../../../../../Decorators/AttributeDecorator';
import { CustomElement } from '../../../../Abstracts/CustomElement';
import { DockSide } from '../../../../../Types/DockSide';
import { Disableable } from '../../../../../Behaviors/Disableable';
// #endregion
/**
 * Chat Tool Base - Represents the base class for all Chat Tools.
 *
 * @public
 * @abstract
 */
export class ChatToolBaseElement extends Disableable(CustomElement) {
    // #region Fields
    _isAttached;
    _chatElement;
    _dock;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._isAttached = false;
        this._chatElement = undefined;
        this._dock = 'left';
    }
    // #endregion
    // #region Properties
    /**
     * Gets or sets the `dock` property.
     *
     * @public
     * @attr
     */
    get dock() {
        return this._dock;
    }
    set dock(value) {
        if (this._dock !== value) {
            this._dock = value;
            this.requestUpdate('dock');
        }
    }
    /**
     * Gets the chat element associated with this tool.
     *
     * @protected
     * @readonly
     */
    get chatElement() {
        return this._chatElement;
    }
    /**
     * Attaches the tool to the specified chat element.
     *
     * @public
     * @param chat The chat element to attach to.
     */
    attach(chat) {
        if (this._isAttached) {
            return;
        }
        this._isAttached = true;
        this._chatElement = chat;
    }
}
__decorate([
    Attribute({ type: DockSide }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], ChatToolBaseElement.prototype, "dock", null);
//# sourceMappingURL=ChatToolBaseElement.js.map