function paletteStruct = simrf_lb_getPaletteInfo(lib)
% SIMRF_LB_GETPALETTEINFO retrieves the relevant information about the
% Palette's contents such as model, display name, path, hierarchy, block
% icon path

% Copyright 2014 The MathWorks, Inc.

%% FIELDS
% paletteStruct is an array of structs
% Each struct contains the following fields
% libModel : the name of the model   
% libName  : the display name 
% libPath  : path wrt the root
% iconPath : the path to the corresponding block icon
% libIsTree: if the block contains non-leaf blocks
%%

% Supply information for the SimRF library palette
if strcmp(lib, 'simrfV2libs')
    paletteStruct(1).libModel = 'simrfV2libtop';
    paletteStruct(2).libModel = 'rfphysmodels1';
    paletteStruct(3).libModel = 'rfmathmodels2';
    paletteStruct(1).libName  = 'Circuit Envelope';
    paletteStruct(2).libName  = 'Equivalent Baseband';
    paletteStruct(3).libName  = 'Idealized Baseband';
    paletteStruct(1).libPath  =                                         ...
       fullfile(matlabroot, 'toolbox', 'simrf',  'simrfV2');
    paletteStruct(2).libPath   =                                        ...
       fullfile(matlabroot, 'toolbox', 'rfblks', 'rfblks');
    paletteStruct(3).libPath   =                                        ...
       fullfile(matlabroot, 'toolbox', 'rfblks', 'rfblks');
    paletteStruct(1).iconPath  =                                        ...
       fullfile(matlabroot, 'toolbox', 'simrf',  'simrf_top',           ...
       'simrfV2icon_ce.svg');
    paletteStruct(2).iconPath  =                                        ...
       fullfile(matlabroot, 'toolbox', 'simrf',  'simrf_top',           ...
       'simrfV2icon_eb.svg');
    paletteStruct(3).iconPath  =                                        ...
       fullfile(matlabroot, 'toolbox', 'simrf',  'simrf_top',           ...
       'simrfV2icon_ib.svg');
    paletteStruct(1).libIsTree = true;
    paletteStruct(2).libIsTree = true;
    paletteStruct(3).libIsTree = false;
else
    error(message('simrf:simrfV2errors:InvalidPalette', lib));
end