'use strict';

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

const index = require('./index-1141a245.js');

const MentornityWcBridge = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  componentWillLoad() {
    // these variables are explicitly initialised for enabling TypeScript type checking
    const { accessToken, sessionToken, organisationId, organisationDomain, role, userId, groupId, language, timeZone, timeFormat, dateFormat, weekStartDay, isZoomAuthenticated, } = this;
    this.contextParams = {
      accessToken,
      sessionToken,
      organisationId,
      organisationDomain,
      role,
      userId,
      groupId,
      language,
      timeZone,
      timeFormat,
      dateFormat,
      weekStartDay,
      isZoomAuthenticated,
    };
  }
  render() {
    const Tag = this.component;
    const extraProps = {};
    if (this.extraProps) {
      this.extraProps.split('&').forEach(keyValuePair => {
        const [key, value] = keyValuePair.split('=');
        extraProps[key] = value;
      });
    }
    return (index.h(index.Host, { class: "d-flex flex-grow-1", style: { overflow: 'hidden' } }, index.h("mentornity-root-wrapper", null, index.h(Tag, { contextParams: this.contextParams, extraProps: extraProps }))));
  }
};

exports.mentornity_wc_bridge = MentornityWcBridge;
