<template>
  <div class="ed-code--toolbar">
    <ed-form v-model="model" :form-desc="formDesc" inline size="mini"></ed-form>
  </div>
</template>

<script>
import {getThemes, ModeViews} from "./AceConfig";

export default {
  name: "Toolbar",
  props: {
    model: {
      type: Object,
      default: () => {
      }
    }
  },
  model: {
    prop: "model",
    event: "input"
  },
  data() {
    return {
      formDesc: [
        {
          label: '语言',
          prop: "mode",
          children: {
            tags: "el-select",
            attrs: {
              filterable: true,
              placeholder: '请选择语言'
            },
            options: ModeViews
          },
        },
        {
          label: '主题',
          prop: "theme",
          children: {
            tags: "el-select",
            attrs: {
              placeholder: '请选择主题'
            },
            options: getThemes()
          },
        },
        // {
        //   label: '是否自动换行',
        //   prop: "wrap",
        //   children: {
        //     tags: "el-switch",
        //     attrs: {
        //       placeholder: '请选择主题'
        //     },
        //     options: getThemes()
        //   },
        // },
      ]
    }
  }
}
</script>

<style scoped>

</style>
