// packages / index.js
// 导入单个组件
// import setActiveStyleSheet from './style_control/index'
import BoxTemplate from "@/views/boxTemplate.vue"
import TableTemplate from "@/views/tableTemplate.vue"
import TitleTemplateNav from "@/views/titleTemplateNav.vue"
import TitleTemplateCallBack from "@/views/titleTemplateCallBack.vue"
import Subtitle from "@/views/subtitle.vue"
import TableMergeTemplate from "@/views/tableMergeTemplate.vue"
import TableMergeTreeTemplate from "@/views/tableTemplate/public_table_template.vue"
// 以数组的结构保存组件，便于遍历
const components = [

]

// 定义 install 方法
const install = function (Vue) {
  if (install.installed) return
  install.installed = true
  // Vue.prototype.$setActiveStyleSheet = setActiveStyleSheet;
  // 遍历并注册全局组件
  // components.map(component => {
  //   Vue.component(component.name, component)
  // })
  Vue.component(BoxTemplate.name, BoxTemplate);
  Vue.component(TableTemplate.name, TableTemplate);
  Vue.component(TitleTemplateNav.name, TitleTemplateNav);
  Vue.component(TitleTemplateCallBack.name, TitleTemplateCallBack);
  Vue.component(Subtitle.name, Subtitle);
  Vue.component(TableMergeTemplate.name, TableMergeTemplate);
  Vue.component(TableMergeTreeTemplate.name, TableMergeTreeTemplate);




}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export default {
  // 导出的对象必须具备一个 install 方法
  install,
  // 组件列表
  // ...components,
}