import { getText } from "../../locales";

/**
 * 默认层级配置
 */
export var DEFAULT_LEVEL_CONFIG = {
  level1: {
    superTabsBg: '#3b2865',
    cardWidth: 106,
    cardHeight: 60,
    paddingLeft: 0
  },
  level2: {
    superTabsBg: '#7F56DA',
    cardWidth: 120,
    cardHeight: 56,
    paddingLeft: 20
  },
  level3: {
    superTabsBg: '#344054',
    cardWidth: 120,
    cardHeight: 56,
    paddingLeft: 40
  }
};

/**
 * 获取展开配置
 */
export var getExpandConfig = function getExpandConfig() {
  return {
    active: {
      icon: 'pisell2-minimize-01',
      text: getText('pisell-tabbar-minimize')
    },
    inactive: {
      icon: 'pisell2-expand-01',
      text: getText('pisell-tabbar-expand')
    }
  };
};

/**
 * 默认数据项配置
 */
export var DEFAULT_ITEMS = {
  all: {
    id: '0',
    shop_id: 9,
    parent_id: 0,
    name: getText('pisell-tabbar-all'),
    slug: 'all',
    icon: ''
  },
  search: {
    id: '-1',
    shop_id: 9,
    parent_id: 0,
    name: getText('table-filter-search'),
    text: getText('table-filter-search'),
    slug: 'search',
    key: 'search',
    icon: '',
    customClick: true
  },
  expand: {
    id: '-2',
    shop_id: 9,
    parent_id: 0,
    key: 'expand',
    icon: 'pisell2-expand-01',
    name: 'Expand',
    slug: 'expand',
    customClick: true
  }
};

/**
 * 获取层级对应的添加项配置
 */
export var LEVEL_ADD_ITEMS = {
  level1: ['search', 'expand'],
  level2: ['expand', 'all'],
  level3: ['expand', 'all']
};