import Plugin from 'src/plugin-system/plugin.class';

export default class BcAquaOffCanvas extends Plugin {
    init() {
        this._bindEvents();
    }

    _bindEvents() {
       document.addEventListener('click', function(event) {
            if (
                event.target.matches('.offcanvas-backdrop') ||
                event.target.matches('.offcanvas-header .offcanvas-close')
            ) {
                setTimeout(function() {
                    document.body.removeAttribute('style');
                }, 500);
            }
        });
    }
}