import {
  filterUndefinedProps
} from "./chunk-YYBF2WRK.js";
import {
  filterUnsetValues
} from "./chunk-CZWEMAKZ.js";
import {
  getSpacingValue
} from "./chunk-RIUSD7SC.js";

// src/components/Box/Box.tsx
import classNames from "classnames/dedupe";
import "@simplybusiness/mobius/src/components/Box/Box.css";
import { jsx } from "react/jsx-runtime";
var Box = ({ ref, ...props }) => {
  const {
    elementType: Element = "div",
    padding,
    paddingX,
    paddingInline,
    paddingInlineStart,
    paddingInlineEnd,
    paddingY,
    paddingBlock,
    paddingBlockStart,
    paddingBlockEnd,
    paddingTop,
    paddingRight,
    paddingBottom,
    paddingLeft,
    minWidth,
    minHeight,
    maxWidth,
    maxHeight,
    width,
    height,
    style,
    ...otherProps
  } = props;
  const classes = classNames("mobius", "mobius-box", otherProps.className);
  const fromProps = filterUndefinedProps({
    padding: getSpacingValue(padding),
    paddingInline: getSpacingValue(paddingInline || paddingX),
    paddingBlock: getSpacingValue(paddingBlock || paddingY),
    paddingTop: getSpacingValue(paddingTop || paddingBlockStart),
    paddingRight: getSpacingValue(paddingRight || paddingInlineEnd),
    paddingBottom: getSpacingValue(paddingBottom || paddingBlockEnd),
    paddingLeft: getSpacingValue(paddingLeft || paddingInlineStart),
    minWidth,
    minHeight,
    maxWidth,
    maxHeight,
    width,
    height
  });
  const styleProps = filterUndefinedProps({
    ...fromProps,
    ...style ? filterUnsetValues(style) : {}
  });
  return /* @__PURE__ */ jsx(Element, { ref, style: styleProps, ...otherProps, className: classes });
};
Box.displayName = "Box";

export {
  Box
};
//# sourceMappingURL=chunk-TJCUKTFX.js.map
