(function () {
    'use strict';

    angular
        .module('setoresApp')
        .directive('floatThead', floatThead);

    floatThead.$inject = [];

    /* @ngInject */
    function floatThead() {
        let directive = {
            restrict: 'A',
            scope: false,
            link: linkFunc
        };

        return directive;

        function linkFunc(scope, element) {
            element.floatThead({
                scrollContainer: function ($table) {
                    return $table.closest('.table-scroll');
                }
            });
        }
    }
})();
