import n from "../../../../../../../../../_virtual/index9.js";
import { getResponsiveClassNames as y, getResponsiveStyles as N } from "./get-responsive-styles.js";
import { isResponsiveObject as r } from "./is-responsive-object.js";
import { mergeStyles as p } from "./merge-styles.js";
function g(...i) {
  return Object.assign({}, ...i);
}
function j(i, ...m) {
  let a, o;
  const t = { ...i }, c = g(...m);
  for (const l in c) {
    let s = t[l];
    const e = c[l];
    if (e.default !== void 0 && s === void 0 && (s = e.default), e.type === "enum" && ![e.default, ...e.values].includes(s) && !r(s) && (s = e.default), t[l] = s, "className" in e && e.className) {
      delete t[l];
      const f = "responsive" in e;
      if (!s || r(s) && !f) continue;
      if (r(s) && (e.default !== void 0 && s.initial === void 0 && (s.initial = e.default), e.type === "enum" && ([e.default, ...e.values].includes(s.initial) || (s.initial = e.default))), e.type === "enum") {
        const u = y({ allowArbitraryValues: !1, value: s, className: e.className, propValues: e.values, parseValue: e.parseValue });
        a = n(a, u);
        continue;
      }
      if (e.type === "string" || e.type === "enum | string") {
        const u = e.type === "string" ? [] : e.values, [d, v] = N({ className: e.className, customProperties: e.customProperties, propValues: u, parseValue: e.parseValue, value: s });
        o = p(o, v), a = n(a, d);
        continue;
      }
      if (e.type === "boolean" && s) {
        a = n(a, e.className);
        continue;
      }
    }
  }
  return t.className = n(a, i.className), t.style = p(o, i.style), t;
}
export {
  j as extractProps
};
//# sourceMappingURL=extract-props.js.map
