<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <title>Independent line for General Bots based on BOT Framework Webchat Control</title>

  <style>
    html,
    body {
      height: 100%;
      margin: 0;
      overflow: hidden;
      padding: 0;
    }
  </style>
</head>

<body>
  <div id="botPlaceholder"></div>
  <script src="botchat.js"></script>
  <script>
    const params = BotChat.queryParams(location.search);
    const user = {
      id: params['userid'] || 'userid',
      name: params['username'] || 'username'
    };
    const bot = {
      id: params['botid'] || 'botid',
      name: params['botname'] || 'botname'
    };
    window['botchatDebug'] = params['debug'] && params['debug'] === 'true';
    BotChat.App({
      bot: bot,
      locale: params['locale'],
      resize: 'window',
      sendTyping: true,
      user: user,
      locale: 'en-us',
      directLine: {
        secret: params['s'],
        token: params['t'],
        domain: params['domain'],
        webSocket: params['webSocket'] && params['webSocket'] === 'true' // defaults to true
      }
    }, document.getElementById('botPlaceholder'));
  </script>
</body>

</html>