import React from 'react';
import { FullscreenModal } from '@theorchard/suite-components';
import { CONTRACT_LIFECYCLE_MODAL_SCREENS } from 'src/apollo/type-constants/contract';

export interface ContractLifecycleFullscreenModalTitlePropTypes {
    modalScreen: string;
}

export const ContractLifecycleFullscreenModalTitle: React.FC<
    ContractLifecycleFullscreenModalTitlePropTypes
> = ({ modalScreen }) => {
    switch (modalScreen) {
        case CONTRACT_LIFECYCLE_MODAL_SCREENS.GENERAL_INFORMATION:
            return (
                <FullscreenModal.Title title="Enter General Contract Information">
                    <span data-testid="description">
                        Tell us what account this contract is for and provide
                        <br />
                        some fundamental details about the contract.
                    </span>
                </FullscreenModal.Title>
            );
        case CONTRACT_LIFECYCLE_MODAL_SCREENS.CURRENT_PERIOD:
            return (
                <FullscreenModal.Title
                    data-testid="current-period-title"
                    title="Set Up Current Period Rules"
                >
                    <span data-testid="current-period-title-description">
                        You&apos;ll be able to set the contract
                        <br />
                        to renew or to be continuously active in this step.
                    </span>
                </FullscreenModal.Title>
            );
        case CONTRACT_LIFECYCLE_MODAL_SCREENS.SUBSEQUENT_PERIOD:
            return (
                <FullscreenModal.Title
                    data-testid="subsequent-period-title"
                    title="Set Up Subsequent Period Rules"
                >
                    <span data-testid="subsequent-period-title-description">
                        You can set contract renewal rules for the period(s)
                        <br />
                        which come after the current period.
                    </span>
                </FullscreenModal.Title>
            );
        default:
            return null;
    }
};
