function varargout = aerosim3dicon(varargin)
%AEROSIM3DICON Gateway function to the private directory of the
% Simulation 3D Library of Aerospace Blockset.

% Copyright 2023 The MathWorks, Inc.

    if nargin < 2
        error(message('aeroblks_sim3d:aerosim3dicon:invalidUsage'));
    end
    action = varargin{1};
    block = varargin{2};
    if nargin >= 3
        context = varargin{3};
    else
        context = {};
    end
    p = {};  % Use for varargout

    switch action
      case 'Sim3dAircraft'
        % TODO port from sim3dblkssharedicon(sim3dblksaircraft)
      case 'Sim3dRotorcraft'
        % TODO port from sim3dblkssharedicon(sim3dblksrotorcraft)
      case 'Sim3dSpacecraft'
        % TODO port from sim3dblkssharedicon(sim3dblksspacecraft)
      case {'Sim3dSkyHoggPack', 'Sim3dAirlinerPack', 'Sim3dGAPack', ...
            'Sim3dAirTransportPack', 'Sim3dCustomAircraftPack', ...
            'Sim3dLightHelicopterPack', 'Sim3dHelicopterPack', ...
            'Sim3dMultirotorPack', 'Sim3dCubeSatPack', 'Sim3dSmallSatPack'}
        sim3dpack(block, action, context);
      otherwise
        error(message('aeroblks_sim3d:aerosim3dicon:invalidBlock'));
    end

    if nargout ~= 0
        varargout = cell(nargout,1);
    end

    if ~isempty(p)
        for i = 1:nargout
            varargout(i) = p(i);
        end
    else
        % return dummy values
        for i = 1:nargout
            varargout(i) = {0};
        end
    end

end
