[{isys type="f_react_bridge" component=$reactComponent params=$reactParams}]

<link rel="stylesheet" type="text/css" href="[{$formsDocumentRoot}]src/classes/modules/forms/react/dist/styles.css">
<script type="text/javascript">
    // @see AOF-22 Unmark all menus.
    $('mainMenu').select('li').invoke('removeClassName', 'active');

    if ($('mainMenu').down('li.add-ons')) {
      // Mark the "add-on" menu, if it exists.
      $('mainMenu').down('li.add-ons').addClassName('active');
    } else if ($('mainMenu').down('li.extras')) {
      // Otherwise mark the "extras" menu, if it exists.
      $('mainMenu').down('li.extras').addClassName('active');
    }

    new dragBar({
        dragContainer:  'draggableBar',
        leftContainer:  'menuTreeOn',
        rightContainer: 'contentArea',
        moveInfoBox:    true,
        defaultWidth:   0
    }).deactivateBar();

    $('isys_form').on('submit', (ev) => {
      ev.preventDefault();
    });

    try {
      window.currentUser = JSON.parse('[{$currentUser|json_encode|escape:"javascript"}]');
      window.forms = {
        auth: JSON.parse('[{$formsAuth|json_encode|escape:"javascript"}]')
      };
    } catch {
      window.currentUser = {name: 'anonymous', id: '0'};
      window.forms = {
        auth: {
          create: false,
          view: true,
          edit: false,
          delete: false,
          execute: false
        }
      };
    }
</script>
