// #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 { DropDownButtonElement } from '../../../Buttons/DropDownButton/DropDownButtonElement';
import { Component } from '../../../../Decorators/ComponentDecorator';
import { reactionChatToolElementTemplate } from './ReactionChatToolElementTemplate';
import { ChatToolBaseElement } from './Abstracts/ChatToolBaseElement';
import { ChatReactions } from '../Models/IChatReaction';
import { MenuElement } from '../../../Selectors/Menu/MenuElement';
import { MenuItemElement } from '../../../Selectors/Menu/MenuItemElement';
import { EmojiElement } from '../../Emoji/EmojiElement';
import { Property } from '../../../../Decorators/PropertyDecorator';
import { Themeable } from '../../../../Behaviors/Themeable';
// #endregion
/**
 *   [part='reaction'] {
            min-width: unset;
            [part='emoji'] {
                --emoji-background-color: #{base.component-property($props, background-color)};
            }
        }
 */
/**
 * The `{@link ReactionChatToolElement}` element.
 *
 * @public
 */
let ReactionChatToolElement = class ReactionChatToolElement extends Themeable(ChatToolBaseElement) {
    // #region Fields
    _reactions;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._reactions = ChatReactions.default;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `{@link is}` property.
     * The `{@link is}` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-reaction-chat-tool';
    }
    /**
     * Gets or sets the `reactions` property.
     *
     * @public
     */
    get reactions() {
        return this._reactions;
    }
    set reactions(value) {
        if (this._reactions !== value) {
            this._reactions = value;
            this.requestUpdate('reactions');
        }
    }
    // #endregion
    // #region Methods
    execute(args) {
        if (!this.chatElement?.input) {
            return false;
        }
        this.chatElement.input.send(args);
        return true;
    }
};
__decorate([
    Property({ type: Array }),
    __metadata("design:type", Array),
    __metadata("design:paramtypes", [Array])
], ReactionChatToolElement.prototype, "reactions", null);
ReactionChatToolElement = __decorate([
    Component({
        selector: 'mosaik-reaction-chat-tool',
        template: reactionChatToolElementTemplate,
        // styles: reactionChatToolElementStyle,
        host: {
            slot: 'tools'
        },
        options: {
            mode: 'open',
            delegatesFocus: true
        },
        imports: [
            DropDownButtonElement,
            MenuElement,
            MenuItemElement,
            EmojiElement
        ]
    }),
    __metadata("design:paramtypes", [])
], ReactionChatToolElement);
export { ReactionChatToolElement };
//# sourceMappingURL=ReactionChatToolElement.js.map