import React from 'react'; import { FormGroup, Label, Radio } from '@patternfly/react-core'; import { useAppDispatch, useAppSelector } from '../../../../store/hooks'; import { changeFileSystemPartitionMode, selectFileSystemPartitionMode, selectProfile, } from '../../../../store/wizardSlice'; const FileSystemPartition = () => { const dispatch = useAppDispatch(); const fileSystemPartitionMode = useAppSelector(selectFileSystemPartitionMode); const hasOscapProfile = useAppSelector(selectProfile); if (hasOscapProfile) { return undefined; } return ( {' '} Use automatic partitioning } name="sc-radio-automatic" description="Automatically partition your image to what is best, depending on the target environment(s)" isChecked={fileSystemPartitionMode === 'automatic'} onChange={() => { dispatch(changeFileSystemPartitionMode('automatic')); }} /> { dispatch(changeFileSystemPartitionMode('manual')); }} /> ); }; export default FileSystemPartition;