"use strict";
const __vanilla_filescope__ = require("@vanilla-extract/css/fileScope");
const css = require("@vanilla-extract/css");
const core = require("@capsizecss/core");
function _interopNamespaceCompat(e) {
  if (e && typeof e === "object" && "default" in e)
    return e;
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const __vanilla_filescope____namespace = /* @__PURE__ */ _interopNamespaceCompat(__vanilla_filescope__);
__vanilla_filescope____namespace.setFileScope("packages/vanilla-extract/src/capsize.css.ts", "capsize");
const capsizeVars = css.createThemeContract({
  fontSize: null,
  lineHeight: null,
  capHeightTrim: null,
  baselineTrim: null
});
const capsizeStyle = css.style(core.createStyleObject({
  fontSize: capsizeVars.fontSize,
  lineHeight: capsizeVars.lineHeight,
  capHeightTrim: capsizeVars.capHeightTrim,
  baselineTrim: capsizeVars.baselineTrim
}), "capsizeStyle");
__vanilla_filescope____namespace.endFileScope();
const createVanillaStyle = (_ref) => {
  let {
    values,
    mediaQueries,
    debugId
  } = _ref;
  const vars = {
    vars: css.assignVars(capsizeVars, values)
  };
  if (typeof mediaQueries !== "undefined") {
    const mqs = {};
    Object.entries(mediaQueries["@media"]).forEach((_ref2) => {
      let [mq, val] = _ref2;
      const builtValues = "capHeightTrim" in val ? val : core.precomputeValues(val);
      mqs[mq] = {
        vars: css.assignVars(capsizeVars, builtValues)
      };
    });
    vars["@media"] = mqs;
  }
  return css.composeStyles(capsizeStyle, css.style(vars, debugId));
};
function createTextStyle() {
  const hasMediaQueries = typeof (arguments.length <= 1 ? void 0 : arguments[1]) !== "undefined" && typeof (arguments.length <= 1 ? void 0 : arguments[1]) !== "string";
  const debugId = hasMediaQueries ? arguments.length <= 2 ? void 0 : arguments[2] : arguments.length <= 1 ? void 0 : arguments[1];
  const mediaQueries = hasMediaQueries ? arguments.length <= 1 ? void 0 : arguments[1] : void 0;
  if ("capHeightTrim" in (arguments.length <= 0 ? void 0 : arguments[0])) {
    return createVanillaStyle({
      values: arguments.length <= 0 ? void 0 : arguments[0],
      mediaQueries,
      debugId
    });
  }
  return createVanillaStyle({
    values: core.precomputeValues(arguments.length <= 0 ? void 0 : arguments[0]),
    mediaQueries,
    debugId
  });
}
__vanilla_filescope__.setFileScope("src/lib/css/capsize.css.ts", "braid-design-system");
__vanilla_filescope__.endFileScope();
exports.createTextStyle = createTextStyle;
