"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jquery_1 = __importDefault(require("jquery"));
document.addEventListener('DOMContentLoaded', () => {
    //  FAB
    const btnToTop = (0, jquery_1.default)('.fab-menu.fab-menu-bottom-right');
    if (btnToTop.length) {
        (0, jquery_1.default)('.content-wrapper')
            .on('scroll', () => {
            if ((0, jquery_1.default)('.content-wrapper')[0].scrollTop > 20) {
                btnToTop.removeClass('d-none');
            }
            else {
                btnToTop.addClass('d-none');
            }
        });
        (0, jquery_1.default)(document)
            .on('click', '.fab-menu a', (event) => {
            event.preventDefault();
            (0, jquery_1.default)('.content-wrapper')
                .animate({
                scrollTop: 0
            }, 200);
        });
    }
});
