function [mapName, relativePathToMapFile, found] = getBlockHelpMapNameAndPath(block_type)
%  Returns the mapName and the relative path to the maps file for this block_type

%  Internal note:
%   This function is currently used only for finding the appropriate
%   license-specific map file for Spectrum Analyzer block.

%   Copyright 2016-2018 The MathWorks, Inc.

if isequal(block_type, 'SpectrumAnalyzer')
    % Set the appropriate map file for SpectrumAnalyzer block when DST is
    % not installed
    found = true;
    if (isempty(ver('dsp')) || ~builtin('license','test','Signal_Blocks'))  &&    ...
            (~isempty(ver('simscape')) || ~isempty(ver('rfblks')))
        mapName = 'spectrumanalyzer';
        if ~isempty(ver('rfblks')) && builtin('license','test','RF_Blockset')
            relativePathToMapFile = '/simrf/helptargets.map';
        else
            relativePathToMapFile = '/physmod/simscape/helptargets.map';
        end
    else
        mapName = 'dspspectrumanalyzer';
        relativePathToMapFile = '/dsp/dsp.map';
    end
else
    mapName = 'User Defined';
    relativePathToMapFile = '/dsp/dsp.map';
    found = false;
end