export var GroupEventTypes;
(function (GroupEventTypes) {
    GroupEventTypes["GridLabelResize"] = "fb:group:{0}:grid:label:resize";
    GroupEventTypes["GridDescriptionResize"] = "fb:group:{0}:grid:description:resize";
    GroupEventTypes["GridInputSelected"] = "fb:group:{0}:grid:input:selected";
    GroupEventTypes["GridFilter"] = "fb:group:{0}:grid:filter";
    GroupEventTypes["CategoriesExpandAll"] = "fb:group:{0}:grid:categories:expand-all";
    GroupEventTypes["CategoriesCollapseAll"] = "fb:group:{0}:grid:categories:collapse-all";
    GroupEventTypes["CategoryToggle"] = "fb:group:{0}:grid:category:toggle";
})(GroupEventTypes || (GroupEventTypes = {}));
export default class GroupEvents extends Jade.EventBus {
    constructor(options) {
        super(options);
        this.m_groupId = options.groupId;
    }
    get groupId() {
        return this.m_groupId;
    }
    inputSelectedSubscribe(callback) {
        return this.subscribe(GroupEventTypes.GridInputSelected, callback);
    }
    labelResizeSubscribe(callback) {
        return this.subscribe(GroupEventTypes.GridLabelResize, callback);
    }
    filterSubscribe(callback) {
        return this.subscribe(GroupEventTypes.GridFilter, callback);
    }
    categoriesCollapseAllSubscribe(callback) {
        return this.subscribe(GroupEventTypes.CategoriesCollapseAll, callback);
    }
    categoriesExpandAllSubscribe(callback) {
        return this.subscribe(GroupEventTypes.CategoriesExpandAll, callback);
    }
    categoryToggleSubscribe(callback) {
        return this.subscribe(GroupEventTypes.CategoryToggle, callback);
    }
    inputSelectedPublish(e) {
        this.publish(GroupEventTypes.GridInputSelected, e);
    }
    labelResizePublish(e) {
        this.publish(GroupEventTypes.GridLabelResize, e);
    }
    filterPublish(e) {
        this.publish(GroupEventTypes.GridFilter, e);
    }
    categoriesCollapseAllPublish() {
        this.publish(GroupEventTypes.CategoriesCollapseAll);
    }
    categoriesExpandAllPublish() {
        this.publish(GroupEventTypes.CategoriesExpandAll);
    }
    categoryTogglePublish() {
        this.publish(GroupEventTypes.CategoryToggle);
    }
    subscribe(eventName, callback) {
        return super.subscribe(eventName.replaceAll("{0}", this.groupId), callback);
    }
    publish(eventName, args) {
        super.publish(eventName.replaceAll("{0}", this.groupId), args);
    }
}
