import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import liff from '@line/liff';
import { VueClipboard } from "@soerenmartius/vue3-clipboard";

// import "@/assets/css/normalize.css";
import "@/assets/css/common.less";
// import './registerServiceWorker'

liff.init({
    liffId: import.meta.env.VITE_APP_LINE_LIFF_ID
  }).then(() => {

    window.liff = liff;
    
    const vue = createApp(App);

    // 將LIFF實例提供給應用
    vue.use(VueClipboard);
    vue.use(store).use(router).mount("#app");
  
  }).catch((error) => {
    console.error('初始化 LIFF 時出錯:', error);
  });
