/*
* 获取组件是否开启开篇模式
* */

const cardModes = {
  circle: 'circle',
};

function getCardMode(componentData) {
  const {
    componentExtInfo,
  } = componentData;
  const {
    cardMode = '',
    wrapperModes = 'margin\npadding\ncardMode',
  } = componentExtInfo;

  const parseWrapperModes = wrapperModes.split('\n');

  return parseWrapperModes.indexOf('margin') > -1 && cardModes[cardMode] || '';
}

export default {
  getCardMode,
};
