const d = (i, r, o, n, t) => {
  const l = o === "Width" ? "width" : "height", h = o === "Width" ? "x" : "y", g = o === "Width" ? "shrinkLeftAt" : "shrinkTopAt", f = o === "Width" ? "overflowWidthAt" : "overflowHeightAt", v = o === "Width" ? t?.left || 0 : t?.top || 0, A = o === "Width" ? t?.right || 0 : t?.bottom || 0, p = r - v + A;
  if (o === "Width" ? i.magnetizeRight : i.magnetizeBottom)
    i[h] = i[h] + n;
  else {
    const s = i[f];
    s && (s > p ? i[l] = p : (i[l] = s, i[f] = void 0));
    const c = i[g];
    if (c && !i[f]) {
      const W = r - v - i[l] + A;
      c <= W ? (i[h] = c, i[g] = void 0) : i[h] = W;
    }
  }
};
export {
  d as expandingParentContainer
};
