import { canUseDom as n } from "./can-use-dom.mjs";
import { isDev as o } from "./is-dev.mjs";
import { devError as i } from "./dev-log.mjs";
let t = null, e = null;
n && (t = document.createElement("div"), t.className = "adm-px-tester", t.style.setProperty("--size", "10"), document.body.appendChild(t), e = document.createElement("div"), e.className = "adm-px-tester", document.body.appendChild(e), o && window.getComputedStyle(e).position !== "fixed" && i("Global", "The px tester is not rendering properly. Please make sure you have imported `antd-mobile/es/global`."));
function m(r) {
  return t === null || e === null || t.getBoundingClientRect().height === 10 ? r : (e.style.setProperty("--size", r.toString()), e.getBoundingClientRect().height);
}
export {
  m as convertPx
};
