/**
 * File:	modules/Mouse.ycp
 * Package:	Mouse configuration
 * Summary:	Main module
 * Authors:	Marcus Schäfer <ms@suse.de>
 *		Klaus Kaempf <kkaempf@suse.de>
 *
 * $Id: mouse_proposal.ycp 14844 2004-02-27 04:23:48Z nashif $
 *
 * Proposal function dispatcher - mouse.
 * See also file proposal-API.txt for details.
 */

{

    textdomain "mouse";

    import "Mouse";

    string func  = (string) WFM::Args(0);
    map    param = (map) WFM::Args(1);
    map    ret   = $[];

    if ( func == "MakeProposal" )
    {
	boolean force_reset      = param["force_reset"     ]:false;
	boolean language_changed = param["language_changed"]:false;

	// call some function that makes a proposal here:
	//
	// DummyMod::MakeProposal( force_reset );

	// Fill return map

	ret =
	    $[
	      "raw_proposal" :  [ Mouse::MakeProposal( force_reset, language_changed ) ],
	      "language_changed": false
	    ];
    }
    else if ( func == "AskUser" )
    {
	boolean has_next = param["has_next"]:false;

	// call some function that displays a user dialog
	// or a sequence of dialogs here:
	//
	// sequence = DummyMod::AskUser( has_next );

	symbol result = (symbol)WFM::CallFunction ("inst_mouse", [true, has_next]);

	// Fill return map

	ret =
	    $[
	      "workflow_sequence" : result,
	      "language_changed"  : false
	    ];
    }
    else if ( func == "Description" )
    {
	// Fill return map.
	//
	// Static values do just nicely here, no need to call a function.

	ret =
	    $[
	      // label text
	      "rich_text_title"	:	_( "Mouse"  ),
	      // menue item text
	      "menu_title"	:	_( "&Mouse" ),
	      "id"		:	"mouse_stuff"
	    ];
    }

    return ret;

/* EOF */
}
