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

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

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