<script>
import { markRaw } from 'vue'

import DefaultModal from '@inside-library/components/modals/default/DefaultModal'
import ParagraphListing from '@inside-library/components/listing/ParagraphListing'

export default {
  name: 'OffersModal',
  extends: DefaultModal,
  data() {
    return {
      selection: {
        title: 'title',
        content: 'content'
      }
    }
  },
  methods: {
    scaffold(fields) {
      return {
        title: fields.title,
        sections: [
          {
            fields: [
              {
                tag: markRaw(ParagraphListing),
                class: 'default-text',
                data: {
                  heritedData: fields.content,
                  heritedOptions: { template: true }
                }
              }
            ]
          }
        ]
      }
    }
  }
}
</script>
