text: import { sendSMS } from '@apps/phone/services/smses'
  import { getNext } from '../utils'
  
  const messageStep = async (req, { config, enrollment, program, state, step, tokens }) => {
  
    await program.load(['phone_number'], {
      transacting: req.trx
    })
  
    await enrollment.load(['phone_number'], {
      transacting: req.trx
    })
  
    const contact_phone_number = enrollment.related('phone_number')
  
    const program_phone_number = program.related('phone_number')
  
    const sms = await sendSMS(req, {
      program_id: program.get('id'),
      program_phone_number_id: program_phone_number.get('id'),
      contact_phone_number_id: contact_phone_number.get('id'),
      from: program_phone_number.get('number'),
      to: contact_phone_number.get('number'),
      body: step.config.message,
      asset_ids: step.config.asset_ids,
      data: tokens,
      queue: false
    })
  
    return {
      action: {
        sms_id: sms.get('id')
      },
      next: getNext(req, { config, state })
    }
  
  }
  
  export default messageStep
  