/**
 * Created by baoyinghai on 5/31/17.
 */
import React from 'react';
import { Select } from '../../../../components/mxa';

const Option = Select.Option;

const keyMap = {
  x: 'x轴',
  y: 'y轴',
  lname: '折线标题'
};

export default {
  getKeys: keys => Object.keys(keyMap),
  setFormItems: (key, setting, fields) => {
    return {
      key,
      label: keyMap[key],
      comp:(
        <Select>
          {fields.map(f => (<Option value={f}>{f}</Option>))}
        </Select>
      ),
      initData: setting[key] || key
    };
  }
}