document.addEventListener("DOMContentLoaded", function () {
    const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
    tooltipTriggerList.forEach(function (tooltipTriggerEl) {
        new bootstrap.Tooltip(tooltipTriggerEl);
    });

    const form = document.querySelector("#fSearch");

    form.addEventListener("submit", (e) => {
        e.preventDefault();

        if (!e.target.elements["query"].value.trim()) {
            alert("검색어를 입력해주세요.");
            return;
        }

        form.submit();
    });
});