import { r as registerInstance, h, H as Host } from './index-ecdfb761.js';
import { L as Logger, S as SozlukApi } from './index-3bf9b308.js';
import { I as InstanceStorage, a as AtamaApiDemo, D as DataApiDemo, K as KimlikApiDemo, T as TakvimApiDemo, U as UyeApiDemo } from './UyeApiDemo-8998ba61.js';
import './data-model-88af49fc.js';
import './User-72c4643a.js';
import './kimlik-api-fddeac81.js';
import './apiBase-6015f41f.js';
import './data-transfer-field-2f305919.js';
import './BaseField-0b01dc2c.js';
import './filter-cbaa3d7d.js';
import './UserSettings-7e4170a7.js';
import './date-utils-49551969.js';
import './membership-b6639471.js';
import './table-config-d73a72ab.js';
import './FieldModelGenerator-378c8613.js';
import './reference-field-a5b414d1.js';
import './index-61dcd269.js';
import './FieldGenerator-3ae403b2.js';
import './date-1bc489bd.js';
import './index-4e451db4.js';
import './index-23baeeef.js';
import './index-09efdc01.js';
import './index-150b6a59.js';
import './string-3065a411.js';

const khanguruUiTestWrapperCss = "khanguru-ui-test-wrapper{display:block}";

const KhanguruUiTestWrapper = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.path = '/';
    this.navigate = (config) => {
      this.logger.infoGroup('navigate', {
        from: this.path,
        to: config.path,
      });
      this.path = config.path;
    };
  }
  componentWillLoad() {
    const { database, testKey } = this;
    this.logger = new Logger(testKey).setLevel('debug');
    this.logger.infoGroup('componentWillLoad', { storageKey: this.storageKey });
    this.storage = new InstanceStorage(this.storageKey, this.logger);
    Object.entries(this.storageData || {}).map(([key, value]) => {
      this.storage.save(key, value);
    });
    this.apiAtama = new AtamaApiDemo(database, this.logger);
    this.apiData = new DataApiDemo(database, this.logger);
    this.apiKimlik = new KimlikApiDemo(database, this.storage, this.logger);
    this.apiTakvim = new TakvimApiDemo(database, this.storage, this.logger);
    this.apiUye = new UyeApiDemo(database, this.storage, this.logger);
    this.apiSozluk = new SozlukApi();
    this.path = this.initialPath;
  }
  render() {
    return (h(Host, null, h("dvn-app-root", { apiAtama: this.apiAtama, apiData: this.apiData, apiKimlik: this.apiKimlik, apiSozluk: this.apiSozluk, apiTakvim: this.apiTakvim, apiUye: this.apiUye, navigate: this.navigate, path: this.path, logger: this.logger, storage: this.storage })));
  }
};
KhanguruUiTestWrapper.style = khanguruUiTestWrapperCss;

export { KhanguruUiTestWrapper as khanguru_ui_test_wrapper };
