<template>
  <div :class="clses" :id="data.id">
    <p v-if="data.type === 'text'">{{ data.content }}</p>
    <rich-text v-else :text-json="data.content"></rich-text>
  </div>
</template>

<script>
import RichText from "./RichText.vue";

export default {
  name: "cont-item",
  components: { RichText },
  props: {
    data: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  computed: {
    clses() {
      return ["cont-item", `cont-${this.data.cls}`];
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>
