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