File size: 778 Bytes
b39afbe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
 * Copyright (c) 2023 MERCENARIES.AI PTE. LTD.
 * All rights reserved.
 */

import { ChatRenderer } from 'omni-client-services';

class OmniSettingsRenderer extends ChatRenderer {
  constructor(opts?: NonNullable<object>) {
    opts ??= {};
    super({ id: 'omni/settings' }, opts);
  }

  async load(): Promise<void> {}

  render(content: { type: string; value: any }): string {
    const comp = `
    <div>

        <div class="flex-row w-full flex-wrap">
          <template x-for='(value,key) of window.client.${content.value}' :key="key">
            <div class=' flex-row gap-1 w-full flex text-xs  pl-1'> <span x-text="key"></span>: <span x-text="value"></span></div>
           </template>

    </div> `;
    return comp;
  }
}

export default OmniSettingsRenderer;