invoiceModule.directive('invoiceManageInfrastructure', ['$log', '$rootScope', '$timeout', 'enums',
    function ($log, $rootScope, $timeout, enums) {
        'use strict';

        $log.debug('invoiceManageInfrastructure.ctor()...');

        return {
            restrict: 'E',
            templateUrl: '/app/vat/invoice/invoice-manage-infrastructure/invoice-manage-infrastructure.html' + '?_=' + Math.random(),
            replace: true,
            scope: {
                state: '='
            },
            controller: 'InvoiceManageInfrastructureController',
            link: function ($scope, $element, $attr) {

                Split(['#vat-report-nav-menu', '#vat-report-content'], {
                    sizes: [15, 85],
                    minSize: [1, 1330],
                    onDragEnd: function () {
                        $timeout(function () {
                            $rootScope.$broadcast(enums.vatEvent.layoutChanged, {});
                        }, 700);
                    }
                })


                $scope.isCollapsed = false;
            }
        };
    }
]);