import React from 'react' ; import { EuiButtonEmpty , EuiFlexGroup , EuiFlexItem , EuiHeaderLinks } from '@elastic/eui' ; import { externalUrl , getWorkplaceSearchUrl } from '../../../shared/enterprise_search_url' ; import { EuiButtonEmptyTo } from '../../../shared/react_router_helpers' ; import { NAV } from '../../constants' ; import { PRIVATE_SOURCES_PATH } from '../../routes' ; export const WorkplaceSearchHeaderActions = ( ) => { if ( ! externalUrl . enterpriseSearchUrl ) return null ; return ( < EuiHeaderLinks > < EuiFlexGroup gutterSize = "s" > < EuiFlexItem > < EuiButtonEmptyTo data - test - subj = "PersonalDashboardButton" iconType = "user" to = { PRIVATE_SOURCES_PATH } size = "s" > { NAV . PERSONAL_DASHBOARD } < /EuiButtonEmptyTo> < /EuiFlexItem> < EuiFlexItem > < EuiButtonEmpty data - test - subj = "HeaderSearchButton" href = { getWorkplaceSearchUrl ( '/search' ) } target = "_blank" iconType = "search" size = "s" > { NAV . SEARCH } < /EuiButtonEmpty> < /EuiFlexItem> < /EuiFlexGroup> < /EuiHeaderLinks>); } ;