import Abstract from './Abstract'
import { STRING, TEXT } from 'substance'
import { RICH_TEXT_ANNOS } from './modelConstants'

export default class CustomAbstract extends Abstract {
  static getTemplate () {
    return {
      type: 'custom-abstract',
      content: [
        { type: 'paragraph' }
      ]
    }
  }

  render (options = {}) {
    return this.title || ''
  }
}

CustomAbstract.schema = {
  type: 'custom-abstract',
  abstractType: STRING,
  title: TEXT(RICH_TEXT_ANNOS)
}

import Abstract from './Abstract'
import { ENUM, TEXT } from 'substance'
import { RICH_TEXT_ANNOS } from './modelConstants'

export default class CustomAbstract extends Abstract {
  static getTemplate () {
    return {
      type: 'custom-abstract',
      content: [
        { type: 'paragraph' }
      ]
    }
  }

  render (options = {}) {
    return this.title || ''
  }
}

CustomAbstract.schema = {
  type: 'custom-abstract',
  abstractType: ENUM(['executive-summary', 'web-summary'], { default: '' }),
  title: TEXT(RICH_TEXT_ANNOS)
}

Use new enum type for abstractType
Use new enum type for abstractType
