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

/**
 * 默认层级配置
 */
export var DEFAULT_LEVEL_CONFIG = {
  level1: {
    superTabsBg: '#3B2865',
    cardWidth: '100%',
    cardHeight: 48,
    paddingLeft: 0,
    positionId: '.tabbar-level-2-wrap'
  },
  level2: {
    cardWidth: '100%',
    cardHeight: 56,
    paddingLeft: 0,
    positionId: '.tabbar-level-3-wrap'
  },
  level3: {
    superTabsBg: 'transparent',
    cardHeight: 40,
    paddingLeft: 0
  }
};

/**
 * 获取展开配置
 */
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: 'All',
    slug: 'All',
    icon: ''
  },
  search: {
    id: -1,
    shop_id: 9,
    parent_id: 0,
    name: '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: [],
  level2: [],
  level3: ['all']
};