import { A as APIBase } from './apiBase-d573f009.js';

const STORAGE_KEY_KIMLIK_USER_ID = 'kimlik_uid';
const STORAGE_KEY_KIMLIK_TOKEN = 'kimlik_token';
class KimlikApiImpl {
  constructor(endpoint, defaultHeaders = {}) {
    this.register = (email, firstName, lastName, password) => this.api.post('register', { email, firstName, lastName, password });
    this.login = (email, password) => this.api.post('login', { email, password });
    this.activateUser = (email, firstName, lastName, password) => this.api.post('', // 'activate/email',
    { email, firstName, lastName, password });
    this.logout = () => this.api.post('logout', {});
    this.addAuthInterceptor = (token) => {
      this.api.addAuthInterceptor(token);
    };
    this.getSession = () => this.api.get('session');
    this.api = new APIBase(endpoint, defaultHeaders);
  }
  getDefaults() {
    return this.api.getDefaults();
  }
}

export { KimlikApiImpl as K, STORAGE_KEY_KIMLIK_TOKEN as S, STORAGE_KEY_KIMLIK_USER_ID as a };
