'use strict';
define(function () {
  var itvDetails = function ($filter) {
    return {
      templateUrl:
        'js/XG/widgets/utilities/itv/views/itvDetails.html',
      restrict: 'EA',
      link: function (scope) {
        scope.detailKeys = [
          { dname: 'ref_photo' },
          { dname: '_code_principal'},
          { dname: '_emplct_lng_vert'},
          { dname: '_car1'},
          { dname: '_car2'},
          { dname: 'quant1'},
          { dname: 'quant2'},
          { dname: 'devices'},
          { dname: 'emplct_circ_1'},
          { dname: 'emplct_circ_2'},
          { dname: 'assemblage'}
        ];
        for (const col of scope.detailKeys) {
          col.title
            = $filter('translate')('itv.correspondance.' + col.dname);
        }
      }
    };
  };

  itvDetails.$inject = ['$filter'];
  return itvDetails;
});