import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
import { style, styleVariants } from "@vanilla-extract/css";
import { calc } from "@vanilla-extract/css-utils";
import { space } from "../atoms/atomicProperties.mjs";
import { responsiveStyle } from "../responsiveStyle.mjs";
setFileScope("src/lib/css/negativeMargin/negativeMargin.css.ts", "braid-design-system");
const stylesForBreakpoint = (bp, property, mapToStyle) => styleVariants(space, (value) => {
  const styleRule = {
    [property]: value ? calc.negate(value) : 0
  };
  return responsiveStyle({
    [bp]: mapToStyle ? mapToStyle(styleRule) : styleRule
  });
}, "stylesForBreakpoint");
const beforePseudo = (rule) => ({
  "::before": rule
});
const afterPseudo = (rule) => ({
  "::after": rule
});
const preventCollapsePseudo = {
  top: style(beforePseudo({
    content: '""',
    display: "table"
  }), "preventCollapsePseudo_top"),
  bottom: style(afterPseudo({
    content: '""',
    display: "table"
  }), "preventCollapsePseudo_bottom")
};
const top = {
  mobile: stylesForBreakpoint("mobile", "marginBottom", beforePseudo),
  tablet: stylesForBreakpoint("tablet", "marginBottom", beforePseudo),
  desktop: stylesForBreakpoint("desktop", "marginBottom", beforePseudo),
  wide: stylesForBreakpoint("wide", "marginBottom", beforePseudo)
};
const bottom = {
  mobile: stylesForBreakpoint("mobile", "marginTop", afterPseudo),
  tablet: stylesForBreakpoint("tablet", "marginTop", afterPseudo),
  desktop: stylesForBreakpoint("desktop", "marginTop", afterPseudo),
  wide: stylesForBreakpoint("wide", "marginTop", afterPseudo)
};
const left = {
  mobile: stylesForBreakpoint("mobile", "marginLeft"),
  tablet: stylesForBreakpoint("tablet", "marginLeft"),
  desktop: stylesForBreakpoint("desktop", "marginLeft"),
  wide: stylesForBreakpoint("wide", "marginLeft")
};
const right = {
  mobile: stylesForBreakpoint("mobile", "marginRight"),
  tablet: stylesForBreakpoint("tablet", "marginRight"),
  desktop: stylesForBreakpoint("desktop", "marginRight"),
  wide: stylesForBreakpoint("wide", "marginRight")
};
endFileScope();
export {
  bottom,
  left,
  preventCollapsePseudo,
  right,
  top
};
