import {service} from "@erayt/titanOne-vue/lib/main.js"

import routeConfig from "../config/route.config";
import modules from "./store/modules";
import getters from "./store/getters";
import rxd from 'vue-dynamic';
import 'vue-dynamic/dist/Dynamic.css';
import "vue-dynamic-theme";
rxd.titan.init();
function handleCustomizeEvent() {
  Eui.Ipc.addSubscribes(
    {
      "edit:phoenix:page": () => {
        Eui.Comm.postToRemote({
          url: "loginAfter.action",
          hostKey: "phoenix",
        },res=>{
          if(res.success){
            const result  = res.data.result;
            sessionStorage.setItem("user_loginId", result.loginId);
            sessionStorage.setItem("loginType", "ecas");
            window.open("/#/project");
          }
        })
      },
    },
    { scopeId: Eui.scopeId }
  );
}

// import rxd from 'vue-dynamic';
// import 'vue-dynamic/dist/Dynamic.css';
// rxd.titan.init();

service.registerApplication("rcs_5.0",{
  routeConfig,
  getters,
  modules
})

service.load();
