import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import { Text, TextVariants, Popover, Button } from '@patternfly/react-core'; import { InfoAltIcon, CaretRightIcon } from '@patternfly/react-icons'; import { FormGroup, Grid } from 'patternfly-react'; import { translate as __ } from 'foremanReact/common/I18n'; import { foremanUrl } from '../../../ForemanRhCloudHelpers'; import Switcher from '../../../common/Switcher'; import AdvancedSettings from './components/AdvancedSettings'; import { settingsDict } from '../../Components/InventorySettings/AdvancedSetting/AdvancedSettingsConstants'; const InventoryAutoUploadSwitcher = ({ autoUploadEnabled, setSetting, getSettings, }) => { useEffect(() => { getSettings(); }, [getSettings]); const handleToggle = () => setSetting({ setting: settingsDict.autoUploadEnabled.name, value: !autoUploadEnabled, }); return (

{__('Red Hat Cloud Inventory')}


{__('Advanced Inventory Settings')} } bodyContent={ } position="right" >
{__('More details can be found in')}{' '} {__('Configure')} {' > '} {__('Inventory Upload')}
); }; InventoryAutoUploadSwitcher.propTypes = { autoUploadEnabled: PropTypes.bool, setSetting: PropTypes.func.isRequired, getSettings: PropTypes.func.isRequired, }; InventoryAutoUploadSwitcher.defaultProps = { autoUploadEnabled: true, }; export default InventoryAutoUploadSwitcher;