import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';

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 PROVIDE_KEY = Symbol('scrollbar');
const CONTAINER_PROVIDE_KEY = Symbol('scrollbar-container');
const BAR_MAP = {
  vertical: {
    offset: 'offsetHeight',
    scroll: 'scrollTop',
    scrollSize: 'scrollHeight',
    size: 'height',
    key: 'vertical',
    axis: 'Y',
    client: 'clientY',
    direction: 'top'
  },
  horizontal: {
    offset: 'offsetWidth',
    scroll: 'scrollLeft',
    scrollSize: 'scrollWidth',
    size: 'width',
    key: 'horizontal',
    axis: 'X',
    client: 'clientX',
    direction: 'left'
  }
};
const COMMON_PROPS = {
  shadow: {
    type: [Boolean, Object],
    default: false
  },
  height: {
    type: [Number, String]
  },
  maxHeight: {
    type: [Number, String]
  },
  native: {
    type: Boolean,
    default: false
  },
  always: {
    type: Boolean,
    default: false
  },
  minSize: {
    type: Number,
    default: 20
  },
  horizontalRatioStyle: {
    type: [String, Array, Object]
  },
  verticalRatioStyle: {
    type: [String, Array, Object]
  },
  shadowStyle: {
    type: [String, Array, Object]
  }
};
const scrollbarProps = _objectSpread({
  containerClass: [Array, Object, String],
  containerStyle: [String, Array, Object],
  contentStyle: [String, Array, Object],
  thumbStyle: [String, Array, Object],
  noresize: Boolean
}, COMMON_PROPS);

export { BAR_MAP, COMMON_PROPS, CONTAINER_PROVIDE_KEY, PROVIDE_KEY, scrollbarProps };
