/**
* External dependencies
*/
import { CodeEditor } from '@nab/code-editor';
import type { CustomPhpScopeRule, Maybe, ScopeRule } from '@nab/types';
/**
* Internal dependencies
*/
import './style.scss';
import { CustomUrlScope } from '../custom-url-scope';
import { getScopeExplanation } from '../explanation';
import { useExperimentAttribute } from '../../../hooks';
export const UrlsOrPhpScope = (): JSX.Element => {
const rules = useExperimentAttribute( 'scope' ) || [];
const status = useExperimentAttribute( 'status' ) ?? 'running';
const [ firstRule ] = rules;
if ( isCustomPhpScopeRule( firstRule ) ) {
return
{ getScopeExplanation( 'urls', [], status ) }
; } return{ getScopeExplanation( 'urls-or-php', [ rule ], status ) }