<template>
  <div>
    <component
      v-for="(item, index) in value"
      :is="item.type"
      :key="index"
      :position="index"
      v-model="value"
      :question="question"
      class="mt-base"
    />
  </div>
</template>
<script lang="ts">
import Vue from "vue";
import questionFormMixin from "../../../../mixins/question-form-mixin";
import If from "./expr/if.vue";
import Else from "./expr/else.vue";

export default Vue.extend({
  name: "expr",
  mixins: [questionFormMixin],
  components: {
    IF: If,
    ELSE: Else,
  },
  props: {
    value: {
      type: Array,
      required: true,
    },
  },
});
</script>
<style scoped lang="less">
/deep/ .ivu-card-head {
  padding: 7px 8px;
}

/deep/ .ivu-card-body {
  padding: 8px;
}
</style>
