import Accordion from '../accordion/index';
import tpl from './accordionListTpl';
const AccordionList = (($) => {
    const DefaultConfig = {
        container: '',                   
        rootClass: 'cd-acd-list',        
        listNode: 'dl',                  
        rowNode: '.J_rowItem',           
        toggleNode: 'dt',                
        toggleClass: 'acd-open',         
        rowClick: null,                  
        tpl: tpl
    };
    class AccordionList {
        constructor(config) {
            this._config = this._getConfig(config);
            if(this._config.container){
                this._init();
            }
        }
        
        _getConfig(config) {
            return $.extend(true,{}, DefaultConfig, config);
        }
        
        _init(){
            this.instance = new Accordion(this._config);
        }
        
        dispose() {
            this.instance.dispose();
        }
    }
    return AccordionList;
})($);
export default AccordionList;