import { useMemo as y } from "react";
function x(e, r, i) {
  var s = y(function() {
    for (var a = [], g = [], v = 0, O = 0, f = 0; f < r; f += 1)
      if (i === "rtl") {
        g[f] = O, O += e[f] || 0;
        var k = r - f - 1;
        a[k] = v, v += e[k] || 0;
      } else {
        a[f] = v, v += e[f] || 0;
        var p = r - f - 1;
        g[p] = O, O += e[p] || 0;
      }
    return {
      left: a,
      right: g
    };
  }, [e, r, i]);
  return s;
}
export {
  x as default
};
