// index-admin.js
// Copyright (C) 2022 DTP Technologies, LLC
// License: Apache-2.0

'use strict';

const DTP_COMPONENT = { name: 'Site Admin', slug: 'site-admin' };

const dtp = window.dtp = window.dtp || { };
dtp.admin = dtp.admin || { };

import DtpSiteAdminApp from './site-admin-app.js';
import DtpWebLog from 'dtp/dtp-log.js';

window.addEventListener('load', async ( ) => {
  // application console log
  dtp.admin.log = new DtpWebLog(DTP_COMPONENT);

  dtp.adminApp = new DtpSiteAdminApp(dtp.user);

  dtp.admin.log.debug('load', 'dispatching load event');
  window.dispatchEvent(new Event('dtp-load-admin'));
});