import * as React from 'react' ; import { AlertModal } from '@opentrons/components' ; import { Portal } from '../../../App/portal' ; const CANCEL = 'cancel' ; const RESET_SOURCE = 'reset source' ; const RESET_CUSTOM_LABWARE_SOURCE = 'Reset Custom Labware source directory?' ; const CLICK_RESET_SOURCE_TO_RESET_YOUR_CUSTOM_LABWARE_DIRECTORY = 'Click "Reset Source" to reset your custom labware directory to its default location.' ; const LABWARE_FILES_IN_YOUR_CURRENT_DIRECTORY_WILL_NOT_BE_MOVED = 'Labware in your current source directory will not be moved nor deleted.' ; export const CANCEL_NAME = 'cancel' ; export const RESET_SOURCE_NAME = 'reset-source' ; export interface ConfirmResetPathModalProps { onCancel : ( ) => unknown ; onConfirm : ( ) => unknown ; } export const ConfirmResetPathModalTemplate = ( { onCancel , onConfirm , } ) : JSX . Element => ( < AlertModal alertOverlay heading = { RESET_CUSTOM_LABWARE_SOURCE } buttons = { [ { name : CANCEL_NAME , children : CANCEL , onClick : onCancel } , { name : RESET_SOURCE_NAME , children : RESET_SOURCE , onClick : onConfirm } , ] } > < p > { CLICK_RESET_SOURCE_TO_RESET_YOUR_CUSTOM_LABWARE_DIRECTORY } < /p> < p > { LABWARE_FILES_IN_YOUR_CURRENT_DIRECTORY_WILL_NOT_BE_MOVED } < /p> < /AlertModal>); export const ConfirmResetPathModal = ( props ) : JSX . Element => ( < Portal > < ConfirmResetPathModalTemplate { ... props } / > < /Portal>);