/** * WordPress dependencies */ import { TextControl } from '@safe-wordpress/components'; import { useSelect } from '@safe-wordpress/data'; import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import { ErrorText } from '@nab/components'; import { store as NAB_DATA } from '@nab/data'; import { getLocalUrlError } from '@nab/utils'; import type { ExperimentEditProps } from '@nab/types'; /** * Internal dependencies */ import './style.scss'; import type { AlternativeAttributes } from '../../types'; export const Alternative = ( { attributes, disabled, setAttributes, }: ExperimentEditProps< AlternativeAttributes > ): JSX.Element => { const { url = '' } = attributes; const homeUrl = useHomeUrl(); const urlError = getLocalUrlError( url, homeUrl ); return (