export default {
  methods: {
    scaffoldOverrides(fields, { addItemAfter, replaceItem }) {
      const space = this.getCheckedData(fields, ['spaces', 'data', 0], {})

      addItemAfter('name', {
        id: 'spaces',
        value: space.title
      })

      replaceItem('phone', {
        id: 'direct-line',
        value: fields.direct_line
      })

      replaceItem('function', {
        id: 'job',
        value: fields.job_title
      })
    }
  }
}
