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

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

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