import { addEvents } from '../../common/common.js';
import signService from '../../apis/sign-api.js';

document.addEventListener('DOMContentLoaded', () => {
    setupEventListeners();
});

const setupEventListeners = () => {
    const eventMap = {
        'signOut': { event: 'click', handler: signService.signOut },
        'toggleSidebar': { event: 'click', handler: toggleSidebar }
    };
    addEvents(eventMap);
};

const toggleSidebar = () => {
    const body = document.body;
    body.classList.toggle("toggle-sidebar");
}