class StudentDetailDecorator < ApplicationDecorator
  delegate :name, to: :birth_country, allow_nil: true, prefix: true
  delegate :name, to: :birth_state, allow_nil: true, prefix: true

  def edfi_indiana_ell_instrument_used
    return if ell_instrument_used_no_value? || ell_instrument_used.nil?

    values = {
      other: '4',
      wida_access: '5',
      w_apt: '6',
      not_available: '7',
      not_assessed_without_cause: '8',
      not_assessed_with_cause: '9',
      wida_alternate: '10',
      annual_las: '11',
      wida_screener: '12'
    }

    type = values[ell_instrument_used.to_sym]
    "http://doe.in.gov/Descriptor/ELLInstrumentUsedDescriptor.xml/#{type}"
  end
end
