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

export default class extends Controller<HTMLElement> {
   scrollToDescr(e: Event & { params: { id: string } }) {
      e.preventDefault();

      const target = document.getElementById(e.params.id);
      if (target) {
         target.scrollIntoView({ behavior: 'smooth', block: 'start' });
      }
   }
}
