<template>
  <el-card>
    <el-tabs type="border-card">
      <el-tab-pane label="分割文件(識別標題)">
        <SplitWordForm :baseUrl="baseUrl" />
      </el-tab-pane>
      <el-tab-pane label="分割文件(根據頁碼)">
        <SplitRangeWordForm :baseUrl="baseUrl" />
      </el-tab-pane>
      <el-tab-pane label="分割文件(根據分頁符號)">
        <SplitPageBreakWordForm :baseUrl="baseUrl" />
      </el-tab-pane>
      <el-tab-pane label="分割文件(根據書籤)">
        <SplitBookMarkWordForm :baseUrl="baseUrl" />
      </el-tab-pane>
    </el-tabs>
  </el-card>
</template>

<script>
import SplitWordForm from './components/SplitWordForm'
import SplitRangeWordForm from './components/SplitRangeWordForm'
import SplitPageBreakWordForm from './components/SplitPageBreakWordForm.vue'
import SplitBookMarkWordForm from './components/SplitBookMarkWordForm.vue'
import config from '@config/index.js'
export default {
  name: 'SplitTool',
  props:{
    env:{
      type: String,
      default: 'prod_sz'
    }
  },
  components: {
    SplitWordForm,
    SplitRangeWordForm,
    SplitPageBreakWordForm,
    SplitBookMarkWordForm
  },
  computed:{
    baseUrl(){
      console.log('config', config, this.env)
      return config[this.env].VUE_APP_GRAPHAPI_URL
    }
  },
}
</script>
