/**
 * WordPress dependencies
 */
import { _x } from '@safe-wordpress/i18n';

/**
 * External dependencies
 */
import { ConversionActionScope } from '@nab/components';
import type { CAEditProps } from '@nab/types';

/**
 * Internal dependencies
 */
import type { Attributes } from './types';

export const Edit = ( {
	scope,
	errors,
	setScope,
}: CAEditProps< Attributes > ): JSX.Element => (
	<>
		<p>
			{ _x(
				'A visitor is considered engaged if they stay on the targeted page for 10 seconds or more, scroll halfway down, or click on something (like a link or button).',
				'text',
				'nelio-ab-testing'
			) }
		</p>
		<ConversionActionScope
			scope={ scope }
			setScope={ setScope }
			error={ errors._scope }
		/>
	</>
);
