/** * WordPress dependencies */ import { createInterpolateElement } from '@safe-wordpress/element'; import { sprintf, _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import { usePluginSetting } from '@nab/data'; import type { ConversionActionScope } from '@nab/types'; /** * Internal dependencies */ import './style.scss'; export type ConversionActionScopeViewProps = { readonly scope: ConversionActionScope; }; export const ConversionActionScopeView = ( { scope, }: ConversionActionScopeViewProps ): JSX.Element | null => { const goalTracking = usePluginSetting( 'goalTracking' ); if ( 'custom' !== goalTracking ) { return null; } switch ( scope.type ) { case 'all-pages': case 'test-scope': case 'php-function': return null; case 'post-ids': return (
${ id }` )
.join( ', ' )
),
{ code: }
) }
${ re }` )
.join( ', ' )
),
{ code: }
) }