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