import { ValueProcessorItem } from '..'
import { Element } from '../../'

export default class IndexProcessor implements ValueProcessorItem {
  public processValue(element: Element, index: number, rootState: any, rootGetters: any) {
    if (element.index === undefined) {
      element.index = index
    }
    return element
  }
}
