"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _vue = require("vue");
require("../Masonry");
var _responsiveObserve = require("../../_util/responsiveObserve");
const useGutter = (gutter, screens) => {
  // const results = ref<[Gap, Gap]>([undefined, undefined]);
  const normalizedGutter = (0, _vue.computed)(() => Array.isArray(gutter.value) ? gutter.value : [gutter.value, undefined]);
  const mergedScreens = (0, _vue.computed)(() => screens.value || {
    xs: true,
    sm: true,
    md: true,
    lg: true,
    xl: true,
    xxl: true
  });
  return (0, _vue.computed)(() => {
    const results = [undefined, undefined];
    normalizedGutter.value.forEach((g, index) => {
      if (typeof g === 'object' && g !== null) {
        for (let i = 0; i < _responsiveObserve.responsiveArray.length; i++) {
          const breakpoint = _responsiveObserve.responsiveArray[i];
          if (mergedScreens.value[breakpoint] && g[breakpoint] !== undefined) {
            results[index] = g[breakpoint];
            break;
          }
        }
      } else {
        results[index] = g;
      }
    });
    return results;
  });
};
var _default = exports.default = useGutter;