<!-- <template>
  <div ref="mfeDraftsAppRef" id="mfe_drafts_app" />
</template>

<script>
import { mount } from 'drafts/drafts';
import mfeWrapper from '../../mixins/mfe-wrapper';
import Vue from 'vue';
import Websockets from '@/services/websockets';

export default {
  name: 'DraftsApp',
  mixins: [
    mfeWrapper({
      mountHandle: mount,
      containerBaseUrl: process.env.BASE_URL,
      componentBaseUrl: '/interagency/drafts',
      wrapperRef: 'mfeDraftsAppRef',
      useShadowDom: false,
      eventHandlers: {
        'token-request': async function () {
          const { auth } = await import('@services/AuthService');
          if (auth) {
            const Authorization = await auth.getAccessToken();
            return Authorization;
          }
        },
        'scopes-request': () => Vue.prototype.$AC.userScopes,
        'ws-request': () => new Websockets(),
      },
    }),
  ],
};
</script> -->
