import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static targets = ["menu", "open", "close"]

  toggle(event) {
    event.preventDefault()

    const menu = this.menuTarget
    const openIcon = this.openTarget
    const closeIcon = this.closeTarget

    menu.classList.toggle("hidden")
    openIcon.classList.toggle("hidden")
    closeIcon.classList.toggle("hidden")
  }
}