"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class Accordion {
    onInput(input) {
        this.state = {
            index: -1,
        };
    }
    handleToggle(index, event) {
        const { autoCollapse } = this.input;
        if (autoCollapse && event.open) {
            this.state.index = index;
        }
        this.emit("toggle", {
            originalEvent: event.originalEvent,
            open: event.originalEvent.target.open,
            index: index,
        });
    }
}
module.exports = Accordion;
