"use client";
'use strict';

var React = require('react');
var useProps = require('../html/use-props.js');
var createRenderState = require('./utils/create-render-state.js');
var buildAttrs = require('../../../../../../../motion-dom@12.38.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js');
var isSvgTag = require('../../../../../../../motion-dom@12.38.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js');

function useSVGProps(props, visualState, _isStatic, Component) {
    const visualProps = React.useMemo(() => {
        const state = createRenderState.createSvgRenderState();
        buildAttrs.buildSVGAttrs(state, visualState, isSvgTag.isSVGTag(Component), props.transformTemplate, props.style);
        return {
            ...state.attrs,
            style: { ...state.style },
        };
    }, [visualState]);
    if (props.style) {
        const rawStyles = {};
        useProps.copyRawValuesOnly(rawStyles, props.style, props);
        visualProps.style = { ...rawStyles, ...visualProps.style };
    }
    return visualProps;
}

exports.useSVGProps = useSVGProps;
