function headings = getSummaryColumnHeadings(columns, unitStr)
% GETSUMMARYCOLUMNHEADINGS returns column headings for task summary

%   Copyright 2022 The MathWorks, Inc.

numCols = length(columns);
headings = cell(1, numCols);

for i=1:numCols
    switch columns(i)
      case coder.profile.ResultColumns.Model
        headings{i} = '<b>Task</b>';
      case coder.profile.ResultColumns.MaxTurnaround
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:MaxTurnaroundTime', unitStr));
      case coder.profile.ResultColumns.AverageTurnaround
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:AvTurnaroundTime', unitStr));
      case coder.profile.ResultColumns.MaxRealTimeExecution
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:MaxExecutionTime', unitStr));
      case coder.profile.ResultColumns.MaxNonRealTimeExecution
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:MaxExecutionTime', unitStr));
      case coder.profile.ResultColumns.AverageRealTimeExecution
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:AvExecutionTime', unitStr));
      case coder.profile.ResultColumns.AverageNonRealTimeExecution
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:AvExecutionTime', unitStr));
      case coder.profile.ResultColumns.MaxSelf
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:MaxSelfTime', unitStr));
      case coder.profile.ResultColumns.AverageSelf
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:AvSelfTime', unitStr));
      case coder.profile.ResultColumns.Calls
        headings{i} = sprintf('<b>%s</b>', ...
            DAStudio.message('CoderProfile:ExecutionTime:ColumnHeadingCalls'));
      case coder.profile.ResultColumns.Links
        headings{i} = '<a></a>';
      otherwise
        assert(false, 'Invalid column specification');
    end
end
