<!DOCTYPE html>
<html>
  <head>
    <title>Plugin demo</title>

    <link type="text/css" rel="stylesheet" href="/css/kalamar-plugin.css" />

    <!-- load client javascript library -->
    <script src="/js/src/plugin/client.js" data-server="http://localhost:3003/"></script>
    <style>
      body, html {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        border-width: 0;
        height: unset !important;
      }

      body {
        min-height: unset !important;
      }
    </style>
  </head>
  <body class="result-view">
    <h2>Example Widget!</h2>
    <script>
      function flood () {
        var i = 0;
        for (; i < 90; i++) {
          KorAPlugin.sendMsg({
            'action' : '-'
          });
        };
      };

      function pluginit (p) {
        p.onMessage = function(msg) {
          switch (msg.key) {
            // console.log("State changed to", msg.key, msg.value);
            case 'glemm':
              let data = {
                'action' : 'pipe',
                'service' : 'http://glemm/'
              };
                   
              if (!msg.value) {
                data['job'] = 'del';
              };
              KorAPlugin.sendMsg(data);
              break;
          }
        };
      };

      function redirect() {

        KorAPlugin.requestMsg({
          "action":"get",
          "key": 'QueryParam'
        }, function (d) {

          const par = new URLSearchParams(d.value.search);
          par.set("q",56);
          
          KorAPlugin.sendMsg({
            'action':'redirect',
            'queryParam' : par.toString()
          })
        });
      }

      function getQueryParam() {
        KorAPlugin.requestMsg({
          "action":"get",
          "key": 'QueryParam'
        }, function (d) {
          KorAPlugin.log(0, d.value.search);
        });
      }
      
      </script>
    <ul>
      <li><a onclick="KorAPlugin.log(333, 'Huhu!')">Send log!</a></li>
      <li><a onclick="KorAPlugin.resize()">Resize</a></li>
      <li><a onclick="KorAPlugin.sendMsg({'action':'pipe','service':'Glemm'})">Add Glemm</a></li>
      <li><a onclick="getQueryParam()">GetQueryParam</a></li>
      <li><a onclick="redirect()">Redirect</a></li>
      <li><a onclick="flood()">Flood!</a></li>
      <li><a onclick="KorAPlugin.requestMsg({'action':'get', 'key':'KQ'}, function (d) { document.write(JSON.stringify(d.value))})">Get KQ</a></li>
      <li><a onclick="KorAPlugin.requestMsg({'action':'get', 'key':'textSigle', 'value':'textSigle'}, function (d) { document.write(JSON.stringify(d.value))})">Get textSigle</a></li>
      <li><a onclick="KorAPlugin.sendMsg({'action':'set', 'key':'QueryForm', 'value':{'q':'[This][is][a][query]'}})">Set query</a></li>
    </ul>
    <p style="width: 2000px">------------------------------------------------------------------------------------------------------------------------</p>
  </body>
</html>
