"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const models = require("./dist-es-projection-geometry-models.cjs");
const DOMVisualElement = require("./dist-es-render-dom-DOMVisualElement.cjs");
const camelToDash = require("./dist-es-render-dom-utils-camel-to-dash.cjs");
const defaults = require("./dist-es-render-dom-value-types-defaults.cjs");
const keysTransform = require("./dist-es-render-html-utils-keys-transform.cjs");
const buildAttrs = require("./dist-es-render-svg-utils-build-attrs.cjs");
const camelCaseAttrs = require("./dist-es-render-svg-utils-camel-case-attrs.cjs");
const isSvgTag = require("./dist-es-render-svg-utils-is-svg-tag.cjs");
const render = require("./dist-es-render-svg-utils-render.cjs");
const scrapeMotionValues = require("./dist-es-render-svg-utils-scrape-motion-values.cjs");
class SVGVisualElement extends DOMVisualElement.DOMVisualElement {
  constructor() {
    super(...arguments);
    this.type = "svg";
    this.isSVGTag = false;
    this.measureInstanceViewportBox = models.createBox;
  }
  getBaseTargetFromProps(props, key) {
    return props[key];
  }
  readValueFromInstance(instance, key) {
    if (keysTransform.transformProps.has(key)) {
      const defaultType = defaults.getDefaultValueType(key);
      return defaultType ? defaultType.default || 0 : 0;
    }
    key = !camelCaseAttrs.camelCaseAttributes.has(key) ? camelToDash.camelToDash(key) : key;
    return instance.getAttribute(key);
  }
  scrapeMotionValuesFromProps(props, prevProps, visualElement) {
    return scrapeMotionValues.scrapeMotionValuesFromProps(props, prevProps, visualElement);
  }
  build(renderState, latestValues, props) {
    buildAttrs.buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);
  }
  renderInstance(instance, renderState, styleProp, projection) {
    render.renderSVG(instance, renderState, styleProp, projection);
  }
  mount(instance) {
    this.isSVGTag = isSvgTag.isSVGTag(instance.tagName);
    super.mount(instance);
  }
}
exports.SVGVisualElement = SVGVisualElement;
//# sourceMappingURL=dist-es-render-svg-SVGVisualElement.cjs.map
