import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import { pick } from 'lodash-es';
import { popperProps } from '../popper/props';

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
const COMPONENT_NAME = {
  MENU: 'FMenu',
  SUB_MENU: 'FSubMenu',
  MENU_ITEM: 'FMenuItem',
  MENU_GROUP: 'FMenuGroup'
};
const CHILDREN_KEY = Symbol('FMenuChildren');
const SUB_MENU_KEY = Symbol('SUB_MENU_KEY');
const MENU_KEY = Symbol('FMenu');
const menuProps = _objectSpread(_objectSpread({}, pick(popperProps, ['getContainer', 'appendToContainer'])), {}, {
  // 当前选中的值
  modelValue: {
    type: [String, Number]
  },
  // 垂直或者水平
  mode: {
    type: String,
    default: 'horizontal',
    validator: value => {
      return ['horizontal', 'vertical'].includes(value);
    }
  },
  // 是否收起
  collapsed: {
    type: Boolean,
    default: false
  },
  // 使用反转样式
  inverted: {
    type: Boolean,
    default: false
  },
  // 是否默认展开全部subMenu
  defaultExpandAll: {
    type: Boolean,
    default: false
  },
  // 当前展开的subMenu的key数组
  expandedKeys: {
    type: Array,
    default: () => []
  },
  // 是否只保持一个子菜单展开
  accordion: {
    type: Boolean,
    default: false
  },
  options: {
    type: Array,
    default() {
      return [];
    }
  }
});
const ROOT_MENU_KEY = Symbol('ROOT_MENU_KEY');

export { CHILDREN_KEY, COMPONENT_NAME, MENU_KEY, ROOT_MENU_KEY, SUB_MENU_KEY, menuProps };
