{"version":3,"file":"ngx-bootstrap-accordion.mjs","sources":["../tmp-esm2022/accordion.config.js","../tmp-esm2022/accordion.component.js","../tmp-esm2022/accordion-group.component.js","../tmp-esm2022/accordion.module.js","../tmp-esm2022/ngx-bootstrap-accordion.js"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as i0 from \"@angular/core\";\n/**\n * Configuration service, provides default values for the AccordionComponent.\n */\nexport class AccordionConfig {\n constructor() {\n /** Whether the other panels should be closed when a panel is opened */\n this.closeOthers = false;\n /** turn on/off animation */\n this.isAnimated = false;\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.2\", ngImport: i0, type: AccordionConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.0.2\", ngImport: i0, type: AccordionConfig, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.2\", ngImport: i0, type: AccordionConfig, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hY2NvcmRpb24vYWNjb3JkaW9uLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUUzQzs7R0FFRztBQUlILE1BQU0sT0FBTyxlQUFlO0lBSDVCO1FBSUUsdUVBQXVFO1FBQ3ZFLGdCQUFXLEdBQUcsS0FBSyxDQUFDO1FBQ3BCLDRCQUE0QjtRQUM1QixlQUFVLEdBQUcsS0FBSyxDQUFDO0tBQ3BCOzhHQUxZLGVBQWU7a0hBQWYsZUFBZSxjQUZkLE1BQU07OzJGQUVQLGVBQWU7a0JBSDNCLFVBQVU7bUJBQUM7b0JBQ1YsVUFBVSxFQUFFLE1BQU07aUJBQ25CIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG4vKipcbiAqIENvbmZpZ3VyYXRpb24gc2VydmljZSwgcHJvdmlkZXMgZGVmYXVsdCB2YWx1ZXMgZm9yIHRoZSBBY2NvcmRpb25Db21wb25lbnQuXG4gKi9cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXG59KVxuZXhwb3J0IGNsYXNzIEFjY29yZGlvbkNvbmZpZyB7XG4gIC8qKiBXaGV0aGVyIHRoZSBvdGhlciBwYW5lbHMgc2hvdWxkIGJlIGNsb3NlZCB3aGVuIGEgcGFuZWwgaXMgb3BlbmVkICovXG4gIGNsb3NlT3RoZXJzID0gZmFsc2U7XG4gIC8qKiB0dXJuIG9uL29mZiBhbmltYXRpb24gKi9cbiAgaXNBbmltYXRlZCA9IGZhbHNlO1xufVxuIl19","import { Component, Input } from '@angular/core';\nimport { AccordionConfig } from './accordion.config';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"./accordion.config\";\n/** Displays collapsible content panels for presenting information in a limited amount of space. */\nexport class AccordionComponent {\n constructor(config) {\n /** turn on/off animation */\n this.isAnimated = false;\n /** if `true` expanding one item will close all others */\n this.closeOthers = false;\n this.groups = [];\n Object.assign(this, config);\n }\n closeOtherPanels(openGroup) {\n if (!this.closeOthers) {\n return;\n }\n this.groups.forEach((group) => {\n if (group !== openGroup) {\n group.isOpen = false;\n }\n });\n }\n addGroup(group) {\n group.isAnimated = this.isAnimated;\n this.groups.push(group);\n }\n removeGroup(group) {\n const index = this.groups.indexOf(group);\n if (index !== -1) {\n this.groups.splice(index, 1);\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.2\", ngImport: i0, type: AccordionComponent, deps: [{ token: i1.AccordionConfig }], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"20.0.2\", type: AccordionComponent, isStandalone: true, selector: \"accordion\", inputs: { isAnimated: \"isAnimated\", closeOthers: \"closeOthers\" }, host: { attributes: { \"role\": \"tablist\" }, properties: { \"attr.aria-multiselectable\": \"closeOthers\" }, styleAttribute: \"display: block\", classAttribute: \"panel-group\" }, ngImport: i0, template: `true — disables accordion group */\n this.isDisabled = false;\n /** Emits when the opened state changes */\n this.isOpenChange = new EventEmitter();\n this._isOpen = false;\n this.accordion = accordion;\n }\n ngOnInit() {\n this.accordion.addGroup(this);\n }\n ngOnDestroy() {\n this.accordion.removeGroup(this);\n }\n toggleOpen() {\n if (!this.isDisabled) {\n this.isOpen = !this.isOpen;\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.2\", ngImport: i0, type: AccordionPanelComponent, deps: [{ token: AccordionComponent }], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"20.0.2\", type: AccordionPanelComponent, isStandalone: true, selector: \"accordion-group, accordion-panel\", inputs: { heading: \"heading\", panelClass: \"panelClass\", isDisabled: \"isDisabled\", isOpen: \"isOpen\" }, outputs: { isOpenChange: \"isOpenChange\" }, host: { properties: { \"class.panel-open\": \"this.isOpen\" }, styleAttribute: \"display: block\", classAttribute: \"panel\" }, ngImport: i0, template: \"