/** * WordPress dependencies */ import { Button, ExternalLink } from '@safe-wordpress/components'; import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import { usePluginSetting } from '@nab/data'; /** * Internal dependencies */ import type { Question } from './types'; export type QuestionListProps = { readonly questions: ReadonlyArray< Question >; readonly onChatBot: () => void; readonly onContactUs: () => void; readonly runWalkthrough?: () => void; }; export const QuestionList = ( { questions, onChatBot, onContactUs, runWalkthrough, }: QuestionListProps ): JSX.Element => { const hasChat = usePluginSetting( 'isChatbotAvailable' ); const hasActions = !! hasChat || !! runWalkthrough; return (

{ _x( 'Help', 'text', 'nelio-ab-testing' ) }

{ _x( 'Here you have some resources that might help you:', 'user', 'nelio-ab-testing' ) }

{ hasActions && (
{ hasChat && ( ) } { runWalkthrough && ( ) }
) }

{ _x( 'Not finding what you need?', 'user', 'nelio-ab-testing' ) }{ ' ' }

); };