<!doctype html>
<html>

<head>
  <base href="/">
  <script src="/dmxAppConnect/dmxAppConnect.js"></script>
  <meta charset="UTF-8">
  <title>RPM Industries</title>

  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />
  <link rel="stylesheet" href="/css/style.css" />
  <script src="/dmxAppConnect/dmxBootstrap5Navigation/dmxBootstrap5Navigation.js" defer></script>
  <script src="/dmxAppConnect/dmxRouting/dmxRouting.js" defer></script>
  <link rel="stylesheet" href="/dmxAppConnect/dmxBootstrap5TableGenerator/dmxBootstrap5TableGenerator.css" />
  <script src="/dmxAppConnect/dmxTyped/dmxTyped.js" defer></script>
  <script src="/dmxAppConnect/dmxTyped/typed.min.js" defer></script>
  <script src="/dmxAppConnect/dmxBootstrap5Modal/dmxBootstrap5Modal.js" defer></script>
  <script src="/dmxAppConnect/dmxFormRepeat/dmxFormRepeat.js" defer></script>
  <script src="/dmxAppConnect/dmxFormatter/dmxFormatter.js" defer></script>
  <link rel="stylesheet" href="/dmxAppConnect/dmxAutocomplete/dmxAutocomplete.css" />
  <script src="/dmxAppConnect/dmxAutocomplete/dmxAutocomplete.js" defer></script>
  <link rel="stylesheet" href="/dmxAppConnect/dmxValidator/dmxValidator.css" />
  <script src="/dmxAppConnect/dmxValidator/dmxValidator.js" defer></script>
  <script src="/dmxAppConnect/dmxBrowser/dmxBrowser.js" defer></script>
</head>

<body is="dmx-app" id="admin">
  <dmx-serverconnect id="conn_urls" url="/api/gs/urls"></dmx-serverconnect>
  <dmx-value id="var_userid"></dmx-value>
  <dmx-value id="var_isvalidated" dmx-bind:value="false"></dmx-value>
  <dmx-value id="var_adminrole" dmx-bind:value="false"></dmx-value>
  <dmx-serverconnect id="whoami" url="/api/security/whoami" dmx-on:success="run([{condition:{outputType:'boolean',if:`(whoami.data.query.validated == 1)`,then:{steps:{run:{name:'set_isvalidated',outputType:'text',action:`var_isvalidated.setValue(true)`}}}}},{condition:{outputType:'boolean',if:`whoami.data.query1.where(\`id\`, 1, \'==\')`,then:{steps:{run:{name:'set_adminrole',outputType:'text',action:`var_adminrole.setValue(true)`}}}}},{condition:{outputType:'boolean',if:`var_isvalidated.value&amp;&amp;var_adminrole.value`,then:{steps:{run:{outputType:'text',action:`var_userid.setValue(whoami.data.identity)`}}}}}])"></dmx-serverconnect>
  <div is="dmx-browser" id="browser1"></div>
  <dmx-serverconnect id="conn_logout" url="/api/security/logout" noload="true"></dmx-serverconnect>
  <nav class="navbar navbar-expand-lg navbar-light bg-success" data-bs-theme="dark">
    <div class="container-fluid">
      <a class="navbar-brand" href="#">Admin</a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar1_collapse" aria-controls="navbar1_collapse" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
      <div class="collapse navbar-collapse" id="navbar1_collapse">
        <div class="navbar-nav">

          <a class="nav-item nav-link active" href="/">Home</a>
          <div class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" id="dropdown1" role="button" aria-haspopup="true" aria-expanded="false">Actions</a>
            <div class="dropdown-menu" aria-labelledby="dropdown1">
              <a class="dropdown-item" href="/dspec2" internal="true">New Part</a>
              <a class="dropdown-item" href="#">Another action</a>
              <a class="dropdown-item" href="#">Something else here</a>
            </div>
          </div>
          <div class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbar1_dropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Account&nbsp;</a>
            <div class="dropdown-menu" aria-labelledby="navbar1_dropdown">
              <a class="dropdown-item" href="#" dmx-on:click="modal1.show()">Login</a>
              <a class="dropdown-item" href="#" dmx-on:click="conn_logout.load({});browser1.goto('/')">Logout</a>
              <div class="dropdown-divider"></div>
              <a class="dropdown-item" href="#">Account</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </nav>
  <div is="dmx-view" id="content">
    <%- await include(content, locals); %>
  </div>
  <script src="/bootstrap/5/js/bootstrap.bundle.min.js"></script>
</body>

</html>