import { isCSSVariableName as n } from "../../animation/utils/is-css-variable.es.js";
import { transformProps as a } from "../utils/keys-transform.es.js";
import { defaultTransformValue as i, readTransformValue as u } from "../dom/parse-transform.es.js";
import { measureViewportBox as p } from "../../projection/utils/measure.es.js";
import { DOMVisualElement as l } from "../dom/DOMVisualElement.es.js";
import { buildHTMLStyles as f } from "./utils/build-styles.es.js";
import { renderHTML as c } from "./utils/render.es.js";
import { scrapeMotionValuesFromProps as d } from "./utils/scrape-motion-values.es.js";
function V(m) {
  return window.getComputedStyle(m);
}
class b extends l {
  constructor() {
    super(...arguments), this.type = "html", this.renderInstance = c;
  }
  readValueFromInstance(e, r) {
    var t;
    if (a.has(r))
      return (t = this.projection) != null && t.isProjecting ? i(r) : u(e, r);
    {
      const s = V(e), o = (n(r) ? s.getPropertyValue(r) : s[r]) || 0;
      return typeof o == "string" ? o.trim() : o;
    }
  }
  measureInstanceViewportBox(e, { transformPagePoint: r }) {
    return p(e, r);
  }
  build(e, r, t) {
    f(e, r, t.transformTemplate);
  }
  scrapeMotionValuesFromProps(e, r, t) {
    return d(e, r, t);
  }
}
export {
  b as HTMLVisualElement,
  V as getComputedStyle
};
//# sourceMappingURL=HTMLVisualElement.es.js.map
