import React, {
	Fragment,
	ReactElement,
} from 'react';

import {
	ModuleScriptDataProps,
} from '@divi/module';
import { DynamicRepeaterAttrs } from './types';


/**
 * Dynamic field's script data component.
 *
 * @since ??
 *
 * @param {ModuleScriptDataProps<DynamicRepeaterAttrs>} props React component props.
 *
 * @returns {ReactElement}
 */
export const ModuleScriptData = ({
	elements,
}: ModuleScriptDataProps<DynamicRepeaterAttrs>): ReactElement => (
	<Fragment>
		{elements.scriptData({
			attrName: 'module',
		})}
	</Fragment>
);

