<template>
  <el-dialog
      title="生成代码"
      :visible.sync="editor.showCode"
      custom-class="code-dialog"
      width="70%">

      <el-tabs v-model="activeName">
<!--        <el-tab-pane label="cURL" name="cURL">-->
<!--          <fp-code-curl/>-->
<!--        </el-tab-pane>-->
        <el-tab-pane label="JS" name="JS">
          <fp-code-js/>
        </el-tab-pane>
        <el-tab-pane label="Java" name="Java">
          <fp-code-java/>
        </el-tab-pane>
        <el-tab-pane label="Python" name="Python">
          <fp-code-python/>
        </el-tab-pane>
        <el-tab-pane label="Go" name="Go">
          <fp-code-go/>
        </el-tab-pane>
        <el-tab-pane label="PHP" name="PHP">
          <fp-code-php/>
        </el-tab-pane>
      </el-tabs>

  </el-dialog>
</template>

<script>
import {mapState} from "vuex";
import FpCodeJava from "./FpCodeJava";
import FpCodePython from "./FpCodePython";
import FpCodeGo from "./FpCodeGo";
import FpCodeCurl from "./FpCodeCurl";
import FpCodePhp from "./FpCodePhp";
import FpCodeJs from "./FpCodeJs";

export default {
  name: "FpCodeContainer",
  components: {FpCodeJs, FpCodePhp, FpCodePython, FpCodeJava, FpCodeGo},
  computed: {
    ...mapState({
      'editor': state => state.editor
    })
  },
  data() {
    return {
      activeName: 'JS'
    }
  },
  methods: {}
}
</script>
