lib/libs/email/content/new-submission/emailTemplates/Waiver1915bState.tsx
import { CommonEmailVariables, Events } from "shared-types";
import { formatNinetyDaysDate, formatDate } from "shared-utils";
import { Text } from "@react-email/components";
import {
PackageDetails,
FollowUpNotice,
DetailsHeading,
Attachments,
MailboxNotice,
} from "../../email-components";
import { styles } from "../../email-styles";
import { BaseEmailTemplate } from "../../email-templates";
export const Waiver1915bStateEmail = (props: {
variables:
| (Events["CapitatedInitial"] & CommonEmailVariables)
| (Events["ContractingInitial"] & CommonEmailVariables);
}) => {
const variables = props.variables;
const previewText = `${variables.authority} ${variables.actionType} Submitted`;
const heading = `This response confirms the submission of your ${variables.authority} ${variables.actionType} to CMS for review:`;
return (
<BaseEmailTemplate
previewText={previewText}
heading={heading}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<FollowUpNotice />}
>
<DetailsHeading />
<PackageDetails
details={{
"State or Territory": variables.territory,
Name: variables.submitterName,
"Email Address": variables.submitterEmail,
[`${variables.actionType} Number`]: variables.id,
"Waiver Authority": variables.authority,
"Proposed Effective Date": formatDate(variables.proposedEffectiveDate),
"90th Day Deadline": formatNinetyDaysDate(variables.timestamp),
Summary: variables.additionalInformation,
}}
/>
<Attachments attachments={variables.attachments} />
<Text style={{ ...styles.text, marginTop: "16px" }}>
{`This response confirms the receipt of your Waiver request. You
can expect a formal response to your submittal to be issued within
90 days, before
${formatNinetyDaysDate(variables.timestamp)}
.`}
</Text>
<MailboxNotice type="Waiver" />
</BaseEmailTemplate>
);
};