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

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


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

