import { transformProps } from "./index166.js";
import { camelToDash } from "./index209.js";
import { getDefaultValueType } from "./index224.js";
import { createBox } from "./index248.js";
import { DOMVisualElement } from "./index258.js";
import { buildSVGAttrs } from "./index275.js";
import { camelCaseAttributes } from "./index276.js";
import { isSVGTag } from "./index277.js";
import { renderSVG } from "./index278.js";
import { scrapeMotionValuesFromProps } from "./index279.js";
//#region node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs
var SVGVisualElement = class 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, props.style);
	}
	renderInstance(instance, renderState, styleProp, projection) {
		renderSVG(instance, renderState, styleProp, projection);
	}
	mount(instance) {
		this.isSVGTag = isSVGTag(instance.tagName);
		super.mount(instance);
	}
};
//#endregion
export { SVGVisualElement };

//# sourceMappingURL=index280.js.map