"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore - Prevent TypeScript from copying the JSON file to the output folder
const employees_json_1 = __importDefault(require("../employees.json"));
const deep_clone_1 = require("./deep-clone");
const isomorphic_node_1 = require("./isomorphic.node");
/**
 * An array of Employee objects. Unlike the raw JSON employee data,
 * the date fields of these objects are `Date` objects rather than strings,
 * and the image paths are fully resolved.
 */
exports.employees = [];
for (let jsonEmployee of employees_json_1.default) {
    // Deep-clone the JSON data, so we don't modify the original objects
    // (in case the consumer wants to use both the raw and enriched objects)
    jsonEmployee = deep_clone_1.deepClone(jsonEmployee);
    exports.employees.push(Object.assign({}, jsonEmployee, {
        dob: new Date(jsonEmployee.dob),
        hiredOn: new Date(jsonEmployee.hiredOn),
        terminatedOn: jsonEmployee.terminatedOn ? new Date(jsonEmployee.terminatedOn) : undefined,
        portrait: isomorphic_node_1.resolve(jsonEmployee.portrait),
        thumbnail: isomorphic_node_1.resolve(jsonEmployee.thumbnail),
    }));
}
//# sourceMappingURL=employees.js.map