(function () {
    global.dashModule
        .directive('supportMail', ['utilsService', 'ordersUtilsService', supportMailDirective]);

    function supportMailDirective(utilsService, ordersUtilsService) {
        return {
            restrict: 'A',
            templateUrl: 'orders/html/supportMailTemplate',
            scope: {
                ordersDetails: '<',
                packages: '<',
                supportMailText: '='
            },
            link: function (scope) {
                scope.calculatePrice = ordersUtilsService.calculatePrice;
                scope.getStatusIcon = utilsService.getStatusIcon;
                scope.hasAgreement = ordersUtilsService.hasAgreement;
            }
        };
    }
})();
