# Installation

There are two ways to include the component in your project:

1. Using NPM
   npm i @qbs-ontrace/ect-cmp

2. Using CDN
   Add these scripts to your HTML file:

```bash
<script type="module" src="https://cdn.jsdelivr.net/npm/@qbs-ontrace/ect-cmp@latest/dist/loader/index.js"></script>
```

# Evidence Collection Component

To start the Web Component:

```bash
<body>
  <div id="app"></div>

  <script type="module">
    import "https://cdn.jsdelivr.net/npm/@qbs-ontrace/ect-cmp@latest/dist/loader/index.js";

    // Wait for the custom element to be registered before using it
    await customElements.whenDefined("id-kyc");
    init(token);

    function init(token) {
      const config = {
        ID: crypto.randomUUID(),
        token: token,
      };
      const component = document.createElement("id-kyc");
      component.config = config;
      component.addEventListener("events", (event) => {
        console.log("EVENT: ", event.detail);
      });
      document.getElementById("app").appendChild(component);
    }
  </script>
</body>
```
