import { r as registerInstance, h, H as Host } from './index-ecdfb761.js';
import { S as SozlukApi } from './index-3bf9b308.js';
import './apiBase-6015f41f.js';
import './data-transfer-field-2f305919.js';
import './filter-cbaa3d7d.js';
import { g as getSessionDetails, c as createMentornityApiInstance, m as mentornityApiEndpoint } from './session-2a491341.js';
import { s as sozlukEntries } from './sozluk-entries-1e8f5234.js';
import './BaseField-0b01dc2c.js';
import './membership-b6639471.js';
import './data-model-88af49fc.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';
import './User-72c4643a.js';
import './UserSettings-7e4170a7.js';
import './cookie-5d9f5819.js';
import './kimlik-api-fddeac81.js';
import './_commonjsHelpers-27f122dd.js';
import './index-d3bd30bd.js';
import './mentorinty-bridge-api-5ca2d652.js';
import './index-e66e8eca.js';
import './attachment-961dd228.js';
import './CalendarConfig-412d1b0f.js';
import './calendar-470c802a.js';
import './index-a3ca021c.js';
import './moment-65eca6b3.js';
import './i18n-09a07b97.js';
import './i18n-0e757ca5.js';

const MentornityAcceptInvitationWrapper = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.getInvitation = async () => {
      this.invitation = await this.api.getInvitation(this.paramsId);
    };
  }
  componentWillLoad() {
    const { headers } = getSessionDetails();
    this.api = createMentornityApiInstance(mentornityApiEndpoint, headers);
    this.apiSozluk = new SozlukApi().setLanguage(this.language).setContents(sozlukEntries);
    this.getInvitation();
  }
  render() {
    if (!this.invitation)
      return;
    const { invitation, apiSozluk, isLoggedIn, api, language } = this;
    const { organisation } = invitation;
    return (h(Host, null, h("mentornity-root-wrapper", { class: "d-block" }, h("div", { class: "pt-2", style: { background: 'var(--color-background-secondary)' } }, h("mentornity-accept-invitation-widget", { organisation: organisation, invitation: invitation, apiSozluk: apiSozluk, api: api, isLoggedIn: isLoggedIn, language: language })))));
  }
};

export { MentornityAcceptInvitationWrapper as mentornity_accept_invitation_wrapper };
