import React from 'react';
import { Document, StyleSheet, View } from '@react-pdf/renderer';
import { getCurrentDateString, format as formatDate } from '@tamanu/utils/dateTime';
import { differenceInYears, differenceInMonths, differenceInDays, differenceInHours } from 'date-fns';
import { FSM_MARITAL_STATUS_LABELS, BINARY_LABELS, TIME_UNIT_OPTIONS, SEX_VALUES } from '@tamanu/constants';
import { Page } from '../pdf/Page';
import { Text } from '../pdf/Text';
import { useLanguageContext } from '../pdf/languageContext';
const styles = StyleSheet.create({
    page: {
        paddingVertical: 10,
        paddingHorizontal: 30,
        fontSize: 9
    },
    table: {
        border: '1 solid black'
    },
    row: {
        flexDirection: 'row',
        borderBottom: '1 solid black'
    },
    lastRow: {
        flexDirection: 'row'
    },
    cell: {
        height: 36,
        borderRight: '1 solid black',
        paddingVertical: 4,
        paddingHorizontal: 3,
        justifyContent: 'flex-start'
    },
    lastCell: {
        borderRight: 0
    },
    label: {
        fontSize: 9,
        marginBottom: 2,
        color: '#333'
    },
    certificateLabel: {
        fontSize: 9,
        color: '#333'
    },
    value: {
        fontSize: 9
    },
    headerRow: {
        flexDirection: 'row',
        minHeight: 50
    },
    titleBox: {
        flex: 1,
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center',
        padding: 5
    },
    headerTitle: {
        fontSize: 14,
        marginBottom: 4,
        textAlign: 'center'
    },
    headerSubtitle: {
        fontSize: 12,
        textAlign: 'center'
    },
    sectionLabel: {
        width: 20,
        justifyContent: 'flex-start',
        alignItems: 'center',
        padding: 4
    },
    partHeader: {
        borderBottom: '1 solid black',
        flexDirection: 'row'
    },
    partHeaderText: {
        fontSize: 9,
        fontWeight: 'bold'
    },
    footer: {
        flexDirection: 'row',
        justifyContent: 'space-between',
        marginTop: 'auto',
        paddingTop: 2,
        borderTop: '1 solid #DEDEDE'
    },
    footerText: {
        fontSize: 8,
        color: '#888'
    },
    causeRow: {
        flexDirection: 'row',
        height: 36
    },
    causeLabel: {
        width: 30,
        justifyContent: 'center',
        alignItems: 'center'
    },
    causeContent: {
        flex: 1,
        padding: 4,
        borderRight: '1 solid black',
        borderBottom: '1 solid black'
    },
    causeInterval: {
        width: 190,
        padding: 4,
        borderBottom: '1 solid black'
    }
});
const Cell = ({ label, value = '', style, width, flex, lastCell = false, height })=>/*#__PURE__*/ React.createElement(View, {
        style: [
            styles.cell,
            style,
            width ? {
                width
            } : {},
            flex ? {
                flex
            } : {},
            lastCell ? styles.lastCell : {},
            height ? {
                height
            } : {}
        ]
    }, label && /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.label
    }, label), /*#__PURE__*/ React.createElement(Text, {
        style: styles.value
    }, value || ' '));
const SEX_ABBREVIATIONS = {
    male: 'M',
    female: 'F',
    other: 'O'
};
const getSexAbbreviation = (sex)=>SEX_ABBREVIATIONS[sex] || '';
const FSM_DATE_FORMAT = 'MM/dd/yyyy';
// Time after onset is stored in minutes; display with the most appropriate unit (e.g. "2 hours", "30 minutes")
const formatTimeAfterOnset = (totalMinutes)=>{
    if (totalMinutes == null || totalMinutes === 0) return '';
    const minutes = Number(totalMinutes);
    if (Number.isNaN(minutes)) return '';
    // Use largest unit that divides evenly (same logic as TimeWithUnitField display)
    const sortedByLargest = [
        ...TIME_UNIT_OPTIONS
    ].sort((a, b)=>b.minutes - a.minutes);
    const option = sortedByLargest.find((o)=>minutes % o.minutes === 0) || TIME_UNIT_OPTIONS[0];
    const value = Math.round(minutes / option.minutes);
    const unit = option.unit;
    const singular = unit.replace(/s$/, ''); // minutes -> minute, hours -> hour, etc.
    const label = value === 1 ? singular : unit;
    return `${value} ${label}`;
};
// Accessor helpers
const getCauseText = (cause)=>cause?.condition?.name || '';
const getCauseInterval = (cause)=>formatTimeAfterOnset(cause?.timeAfterOnset);
const getAgeAtDeath = (dateOfBirth, dateOfDeath)=>{
    if (!dateOfBirth || !dateOfDeath) return '';
    return String(differenceInYears(new Date(dateOfDeath), new Date(dateOfBirth)));
};
const getUnder1Year = (dateOfBirth, dateOfDeath)=>{
    if (!dateOfBirth || !dateOfDeath) return '';
    const dob = new Date(dateOfBirth);
    const dod = new Date(dateOfDeath);
    const years = differenceInYears(dod, dob);
    if (years >= 1) return 'n/a';
    const hours = differenceInHours(dod, dob);
    if (hours < 24) return 'n/a';
    const months = differenceInMonths(dod, dob);
    const afterMonths = new Date(dob);
    afterMonths.setMonth(afterMonths.getMonth() + months);
    const days = differenceInDays(dod, afterMonths);
    return `${months}m ${days}d`;
};
const getUnder1Day = (dateOfBirth, dateOfDeath)=>{
    if (!dateOfBirth || !dateOfDeath) return '';
    const years = differenceInYears(new Date(dateOfDeath), new Date(dateOfBirth));
    if (years >= 1) return 'N';
    const hours = differenceInHours(new Date(dateOfDeath), new Date(dateOfBirth));
    return hours < 24 ? 'Y' : 'N';
};
const getChildBearingAge = (sex, dateOfBirth, dateOfDeath)=>{
    if (!dateOfBirth || !dateOfDeath || sex !== SEX_VALUES.FEMALE && sex !== SEX_VALUES.OTHER) return 'n/a';
    const age = differenceInYears(new Date(dateOfDeath), new Date(dateOfBirth));
    return age >= 15 && age <= 44 ? 'Y' : 'n/a';
};
const getMannerOfDeath = ({ manner, mannerOfDeathDescription })=>{
    if (mannerOfDeathDescription) return mannerOfDeathDescription;
    return manner;
};
const getFSMDisplayDate = (date)=>{
    if (!date) return '';
    return formatDate(date, FSM_DATE_FORMAT);
};
const getDeathWithin42Days = (extraData)=>{
    return extraData?.fsmDeathWithin42Days === 'yes' ? 'Y' : 'N';
};
export const FSMDeathCertificatePrintout = ({ patientData, printedBy })=>{
    const { getEnumTranslation } = useLanguageContext();
    const currentDateString = getCurrentDateString();
    const additionalData = patientData?.additionalData;
    const { motherData, fatherData } = patientData;
    const extraData = patientData?.extraData;
    const dob = patientData?.dateOfBirth;
    const dod = patientData?.dateOfDeath;
    const mannerOfDeath = getMannerOfDeath(patientData);
    return /*#__PURE__*/ React.createElement(Document, null, /*#__PURE__*/ React.createElement(Page, {
        size: "A4",
        orientation: "landscape",
        style: styles.page
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.headerRow
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.titleBox
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.headerTitle
    }, "DEATH CERTIFICATE"), /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.headerSubtitle
    }, "FEDERATED STATES OF MICRONESIA"))), /*#__PURE__*/ React.createElement(View, {
        style: styles.table
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "First name:",
        value: patientData?.firstName
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Middle name:",
        value: patientData?.middleName
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Last name:",
        value: patientData?.lastName
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 60,
        label: "Sex:",
        value: getSexAbbreviation(patientData?.sex)
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date of death:",
        value: getFSMDisplayDate(dod)
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Age:",
        value: getAgeAtDeath(dob, dod)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Under 1 year:",
        value: getUnder1Year(dob, dod)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Under 1 day:",
        value: getUnder1Day(dob, dod)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Date of birth:",
        value: getFSMDisplayDate(dob)
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 250,
        lastCell: true,
        label: "FSM state of death:",
        value: extraData?.fsmStateOfDeath?.name
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Atoll of island group of death:",
        value: extraData?.fsmAtollOfDeath?.name
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Hospital/Dispensary or village & island municipality:",
        value: extraData?.fsmVillageOfDeath?.name
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 150,
        lastCell: true,
        label: "Hospital Record No.:",
        value: patientData?.displayId
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "State & island of birth or country:",
        value: additionalData?.placeOfBirth
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Country of citizenship:",
        value: additionalData?.nationality?.name
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 130,
        label: "Marital status:",
        value: getEnumTranslation(FSM_MARITAL_STATUS_LABELS, extraData?.fsmMaritalStatus)
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 210,
        lastCell: true,
        label: "Surviving spouse (marital):",
        value: extraData?.fsmSurvivingSpouse
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        width: 190,
        label: "Social security no.:",
        value: extraData?.fsmSocialSecurityNumber
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Usual occupation:",
        value: extraData?.fsmUsualOccupation
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        lastCell: true,
        label: "Kind of Business/Ind.:",
        value: extraData?.fsmKindOfBusiness
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        width: 190,
        label: "Residence (FSM state):",
        value: additionalData?.division?.name
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Atoll or Island group:",
        value: additionalData?.subdivision?.name
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        lastCell: true,
        label: "Village or Hamlet, Municipality, Island:",
        value: patientData?.village?.name
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Father first name:",
        value: fatherData?.firstName
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Father middle name:",
        value: fatherData?.middleName
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Father last name:",
        value: fatherData?.lastName
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Mother first name:",
        value: motherData?.firstName
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Mother middle name:",
        value: motherData?.middleName
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Mother last name:",
        value: motherData?.lastName
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        width: 160,
        label: "Informant name:",
        value: extraData?.fsmInformantName
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 160,
        label: "Informant relationship:",
        value: extraData?.fsmInformantRelationship
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Informant address:",
        value: extraData?.fsmInformantAddress
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date information was given:",
        value: getFSMDisplayDate(extraData?.fsmDateInfoGiven)
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.partHeader
    }, /*#__PURE__*/ React.createElement(View, {
        style: {
            flex: 1,
            borderRight: '1 solid black',
            padding: 4
        }
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.partHeaderText
    }, "PART I - Death was caused by:")), /*#__PURE__*/ React.createElement(View, {
        style: {
            width: 190,
            padding: 4
        }
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.partHeaderText
    }, "Approx. Interval - onset & death:"))), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeRow
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.causeLabel
    }, /*#__PURE__*/ React.createElement(Text, null, "a.")), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeContent
    }, /*#__PURE__*/ React.createElement(Text, null, getCauseText(patientData?.causes?.primary))), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.causeInterval,
            {
                borderRight: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(Text, null, getCauseInterval(patientData?.causes?.primary)))), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeRow
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.causeLabel
    }, /*#__PURE__*/ React.createElement(Text, null, "b.")), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeContent
    }, /*#__PURE__*/ React.createElement(Text, {
        style: {
            marginBottom: 4
        }
    }, "Due to, or as a consequence of:"), /*#__PURE__*/ React.createElement(Text, null, getCauseText(patientData?.causes?.antecedent1))), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.causeInterval,
            {
                borderRight: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(Text, null, getCauseInterval(patientData?.causes?.antecedent1)))), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeRow
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.causeLabel
    }, /*#__PURE__*/ React.createElement(Text, null, "c.")), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeContent
    }, /*#__PURE__*/ React.createElement(Text, {
        style: {
            marginBottom: 4
        }
    }, "Due to, or as a consequence of:"), /*#__PURE__*/ React.createElement(Text, null, getCauseText(patientData?.causes?.antecedent2))), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.causeInterval,
            {
                borderRight: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(Text, null, getCauseInterval(patientData?.causes?.antecedent2)))), /*#__PURE__*/ React.createElement(View, {
        style: styles.causeRow
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.causeLabel
    }, /*#__PURE__*/ React.createElement(Text, null, "d.")), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.causeContent,
            {
                borderBottom: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(Text, {
        style: {
            marginBottom: 4
        }
    }, "Due to, or as a consequence of:"), /*#__PURE__*/ React.createElement(Text, null, getCauseText(patientData?.causes?.antecedent3))), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.causeInterval,
            {
                borderRight: 0,
                borderBottom: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(Text, null, getCauseInterval(patientData?.causes?.antecedent3)))), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.row,
            {
                borderTop: '1 solid black',
                borderBottom: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.cell,
            {
                flex: 1,
                borderRight: '1 solid black'
            }
        ]
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.label
    }, "PART II - Other significant conditions: Conditions contributing to death, not related to Part I (a):"), /*#__PURE__*/ React.createElement(Text, {
        style: styles.value
    }, patientData?.causes?.contributing?.map((c)=>c?.condition?.name).join(', '))), /*#__PURE__*/ React.createElement(Cell, {
        width: 190,
        lastCell: true,
        label: "Autopsy",
        value: getEnumTranslation(BINARY_LABELS, patientData?.autopsyRequested)
    }))), /*#__PURE__*/ React.createElement(View, {
        style: styles.footer
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.lastRow
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.footerText
    }, "Print date: "), /*#__PURE__*/ React.createElement(Text, {
        style: styles.footerText
    }, currentDateString, " | "), /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.footerText
    }, "Printed by: "), /*#__PURE__*/ React.createElement(Text, {
        style: styles.footerText
    }, printedBy)), /*#__PURE__*/ React.createElement(View, {
        style: styles.lastRow
    }, /*#__PURE__*/ React.createElement(Text, {
        style: styles.footerText
    }, "1 of 2")))), /*#__PURE__*/ React.createElement(Page, {
        size: "A4",
        orientation: "landscape",
        style: styles.page
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.headerRow
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.titleBox
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.headerTitle
    }, "DEATH CERTIFICATE"), /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.headerSubtitle
    }, "FEDERATED STATES OF MICRONESIA"))), /*#__PURE__*/ React.createElement(View, {
        style: styles.table
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Child Bearing Age (15-44):",
        value: getChildBearingAge(patientData?.sex, dob, dod)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Now pregnant:",
        value: getEnumTranslation(BINARY_LABELS, extraData?.fsmPregnantNow)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Number of weeks:",
        value: extraData?.fsmNumberOfWeeks
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 220,
        label: "Death date within 42 days of delivery or abortion",
        value: getDeathWithin42Days(extraData)
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date of Delivery/Abortion:",
        value: getFSMDisplayDate(extraData?.fsmDateOfDeliveryAbortion)
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(View, {
        style: {
            flex: 1,
            padding: 4,
            borderRight: 0
        }
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.certificateLabel
    }, "I certify that I attended the deceased and that death occurred on the date and at the time my knowledge from the causes shown"))), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Name of physician:",
        value: extraData?.fsmCertifiedByPhysician
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Signature:"
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date signed:"
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(View, {
        style: {
            flex: 1,
            padding: 4,
            borderRight: 0
        }
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.certificateLabel
    }, "Official report and findings of investigation where applicable were reviewed by:"))), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Name of physician:",
        value: extraData?.fsmReviewedByPhysician
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Signature:"
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date signed:"
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Accident, suicide, homicide, undetermined (specify):",
        value: mannerOfDeath
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 150,
        label: "Date of injury:",
        value: getFSMDisplayDate(patientData?.externalCauseDate)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        lastCell: true,
        label: "How injury occurred:",
        value: mannerOfDeath
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        width: 100,
        label: "Injury at work:",
        value: getEnumTranslation(BINARY_LABELS, extraData?.fsmInjuryAtWork)
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Place of injury:",
        value: patientData?.externalCauseLocation
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        lastCell: true,
        label: "Location:",
        value: patientData?.externalCauseNotes
    })), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(View, {
        style: {
            flex: 1,
            padding: 4,
            borderRight: 0
        }
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.certificateLabel
    }, "I certify that I have reviewed this Certificate for completeness and accuracy"))), /*#__PURE__*/ React.createElement(View, {
        style: styles.row
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Name of SD/HS or Designee:"
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Signature:"
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date signed:"
    })), /*#__PURE__*/ React.createElement(View, {
        style: [
            styles.row,
            {
                borderBottom: 0
            }
        ]
    }, /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Name of clerk of courts:"
    }), /*#__PURE__*/ React.createElement(Cell, {
        flex: 1,
        label: "Signature:"
    }), /*#__PURE__*/ React.createElement(Cell, {
        width: 140,
        lastCell: true,
        label: "Date signed:"
    }))), /*#__PURE__*/ React.createElement(View, {
        style: styles.footer
    }, /*#__PURE__*/ React.createElement(View, {
        style: styles.lastRow
    }, /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.footerText
    }, "Print date: "), /*#__PURE__*/ React.createElement(Text, {
        style: styles.footerText
    }, currentDateString, " | "), /*#__PURE__*/ React.createElement(Text, {
        bold: true,
        style: styles.footerText
    }, "Printed by: "), /*#__PURE__*/ React.createElement(Text, {
        style: styles.footerText
    }, printedBy)), /*#__PURE__*/ React.createElement(View, {
        style: styles.lastRow
    }, /*#__PURE__*/ React.createElement(Text, {
        style: styles.footerText
    }, "2 of 2")))));
};

//# sourceMappingURL=FSMDeathCertificatePrintout.js.map