const DEFAULT_OFFSET = 8;
const DEFAULT_THRESHOLD = 3;
const DEFAULT_GAP = 16;
const useStack = config => {
  var _a, _b, _c;
  const result = {
    offset: DEFAULT_OFFSET,
    threshold: DEFAULT_THRESHOLD,
    gap: DEFAULT_GAP
  };
  if (config && typeof config === 'object') {
    result.offset = (_a = config.offset) !== null && _a !== void 0 ? _a : DEFAULT_OFFSET;
    result.threshold = (_b = config.threshold) !== null && _b !== void 0 ? _b : DEFAULT_THRESHOLD;
    result.gap = (_c = config.gap) !== null && _c !== void 0 ? _c : DEFAULT_GAP;
  }
  return [!!config, result];
};
export default useStack;