/** * WordPress dependencies */ import { useSelect, useDispatch } from '@safe-wordpress/data'; import { createInterpolateElement } from '@safe-wordpress/element'; import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import type { Dict, SegmentationRuleId } from '@nab/types'; /** * Internal dependencies */ import './style.scss'; import { SegmentationRule } from '../segmentation-rule'; import { store as NAB_EDITOR } from '../../../store'; export const SegmentationRuleList = (): JSX.Element => { const segmentationRules = useActiveSegmentRules(); const setRuleAttributes = useSetRuleAttributes(); const removeRule = useRemoveRule(); return (
{ _x( 'A visitor participates in the test every time all of the following segmentation rules match:', 'text', 'nelio-ab-testing' ) }
) } { segmentationRules.map( ( rule ) => ({ _x( 'Split tests are usually applied to all visitors. But you can narrow your audience using segmentation rules to target only a subset of your visitors.', 'text', 'nelio-ab-testing' ) }
,{ createInterpolateElement( _x( 'Use the buttons below to add the specific segmentation rules for this segment.', 'user', 'nelio-ab-testing' ), { strong: , } ) }
, ] }