'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-1141a245.js');
const index$1 = require('./index-a2e99c85.js');
const UyeApiDemo = require('./UyeApiDemo-68d79782.js');
require('./data-model-01c368bc.js');
require('./User-dbfbd45e.js');
require('./kimlik-api-663f4884.js');
require('./apiBase-6c66ff1b.js');
require('./data-transfer-field-e8417d5f.js');
require('./BaseField-381327a9.js');
require('./filter-d5040f65.js');
require('./UserSettings-2a2399b1.js');
require('./date-utils-86cd43eb.js');
require('./membership-e87e02ed.js');
require('./table-config-969d3038.js');
require('./FieldModelGenerator-d61f01d4.js');
require('./reference-field-1239b0c3.js');
require('./index-2eea69a0.js');
require('./FieldGenerator-279a646b.js');
require('./date-a24d7714.js');
require('./index-0783d14f.js');
require('./index-9d3d3d15.js');
require('./index-9fd84b93.js');
require('./index-61f9621a.js');
require('./string-de672b69.js');

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

const KhanguruUiTestWrapper = class {
  constructor(hostRef) {
    index.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 index$1.Logger(testKey).setLevel('debug');
    this.logger.infoGroup('componentWillLoad', { storageKey: this.storageKey });
    this.storage = new UyeApiDemo.InstanceStorage(this.storageKey, this.logger);
    Object.entries(this.storageData || {}).map(([key, value]) => {
      this.storage.save(key, value);
    });
    this.apiAtama = new UyeApiDemo.AtamaApiDemo(database, this.logger);
    this.apiData = new UyeApiDemo.DataApiDemo(database, this.logger);
    this.apiKimlik = new UyeApiDemo.KimlikApiDemo(database, this.storage, this.logger);
    this.apiTakvim = new UyeApiDemo.TakvimApiDemo(database, this.storage, this.logger);
    this.apiUye = new UyeApiDemo.UyeApiDemo(database, this.storage, this.logger);
    this.apiSozluk = new index$1.SozlukApi();
    this.path = this.initialPath;
  }
  render() {
    return (index.h(index.Host, null, index.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;

exports.khanguru_ui_test_wrapper = KhanguruUiTestWrapper;
