import { Controller } from '@hotwired/stimulus';

export default class extends Controller {
    static targets = ['menu'];

    toggle() {
        this.menuTarget.classList.toggle('open');
        this.element.querySelector('.hamburger').classList.toggle('open');
    }

    // Fermer le menu quand on clique sur un lien
    close() {
        this.menuTarget.classList.remove('open');
        this.element.querySelector('.hamburger').classList.remove('open');
    }
}
