import React, { useState } from 'react';
import {
Dropdown,
DropdownItem,
KebabToggle,
DropdownPosition,
Grid,
GridItem,
} from '@patternfly/react-core';
import Head from 'foremanReact/components/Head';
import {
INVENTORY_PAGE_TITLE,
ACTIONS_HISTORY_BUTTON_TEXT,
DOCS_BUTTON_TEXT,
CLOUD_PING_TITLE,
} from '../../ForemanInventoryConstants';
import {
getActionsHistoryUrl,
getInventoryDocsUrl,
} from '../../ForemanInventoryHelpers';
import CloudPingModal from './components/CloudPingModal';
const PageTitle = () => {
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
const [showPingModal, setPingModal] = useState(false);
const togglePingModal = () => setPingModal(v => !v);
const dropdownItems = [
{ACTIONS_HISTORY_BUTTON_TEXT}
,
{DOCS_BUTTON_TEXT}
,
{CLOUD_PING_TITLE}
,
];
return (
{INVENTORY_PAGE_TITLE}
{INVENTORY_PAGE_TITLE}
setIsDropdownOpen(false)}
toggle={
setIsDropdownOpen(isOpen)} />
}
isOpen={isDropdownOpen}
isPlain
dropdownItems={dropdownItems}
position={DropdownPosition.right}
/>
);
};
export default PageTitle;