const D = (h, l, r, t, f, $ = !1, m, B, k, W) => {
  const g = f === "Width" ? "width" : "height", i = f === "Width" ? "x" : "y", c = f === "Width" ? "shrinkLeftAt" : "shrinkTopAt", x = f === "Width" ? "overflowWidthAt" : "overflowHeightAt", o = f === "Width" ? W?.left || 0 : W?.top || 0, p = f === "Width" ? W?.right || 0 : W?.bottom || 0, T = f === "Width" ? m : B, z = r - o + p > T ? r - o + p : T, L = f === "Width" ? h.magnetizeRight : h.magnetizeBottom;
  let s = r - l[i] + p;
  if (t[`client${f}`] > s && !$) {
    const A = t[`client${f}`] - s;
    A < l[i] - o ? L ? h[i] = h[i] + k : (h[i] = h[i] - A, h[c] = h[c] || l[i]) : A > l[i] - o && (h[i] = o, h[c] = h[c] || l[i], s = r - o + p, t[`client${f}`] > s && (h[g] = s, h[x] = h[x] || l[g], h[g] < z && (h[g] = z)));
  } else {
    L && (h[i] = h[i] + k);
    return;
  }
};
export {
  D as shrinkingParentContainer
};
