"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createBusinessPlan = createBusinessPlan;
exports.createMarketResearch = createMarketResearch;
exports.createNetworking = createNetworking;
exports.createSourcing = createSourcing;
exports.createProspecting = createProspecting;
const prisma_1 = __importDefault(require("../../utils/prisma"));
// ------------------------------------------------------------------------------------
function createBusinessPlan(req, reply) {
    return __awaiter(this, void 0, void 0, function* () {
        const data = req.body;
        yield prisma_1.default.businessPlan.create({
            data: {
                firstName: data.firstName,
                lastName: data.lastName,
                nationality: data.nationality,
                phoneNumber: data.phoneNumber,
                email: data.email.toLowerCase(),
                projectIdea: data.projectIdea,
                location: data.location,
                educationAndExperience: data.educationAndExperience,
                financingPlan: data.financingPlan,
            },
        });
        return reply.code(200).send({ message: "success" });
    });
}
// ------------------------------------------------------------------------------------
function createMarketResearch(req, reply) {
    return __awaiter(this, void 0, void 0, function* () {
        const data = req.body;
        yield prisma_1.default.marketResearch.create({
            data: {
                firstName: data.firstName,
                lastName: data.lastName,
                phoneNumber: data.phoneNumber,
                email: data.email.toLowerCase(),
                address: data.address,
                city: data.city,
                state: data.state,
                zipCode: data.zipCode,
                country: data.country,
                projectIdea: data.projectIdea,
                educationAndExperience: data.educationAndExperience,
            },
        });
        return reply.code(200).send({ message: "success" });
    });
}
// ------------------------------------------------------------------------------------
function createNetworking(req, reply) {
    return __awaiter(this, void 0, void 0, function* () {
        const data = req.body;
        yield prisma_1.default.networking.create({
            data: {
                firstName: data.firstName,
                lastName: data.lastName,
                phoneNumber: data.phoneNumber,
                email: data.email.toLowerCase(),
                activity: data.activity,
                needForNetworking: data.needForNetworking,
            },
        });
        return reply.code(200).send({ message: "success" });
    });
}
// ------------------------------------------------------------------------------------
function createSourcing(req, reply) {
    return __awaiter(this, void 0, void 0, function* () {
        const data = req.body;
        yield prisma_1.default.sourcing.create({
            data: {
                firstName: data.firstName,
                lastName: data.lastName,
                phoneNumber: data.phoneNumber,
                email: data.email.toLowerCase(),
                activity: data.activity,
                productsToSource: data.productsToSource,
            },
        });
        return reply.code(200).send({ message: "success" });
    });
}
// ------------------------------------------------------------------------------------
function createProspecting(req, reply) {
    return __awaiter(this, void 0, void 0, function* () {
        const data = req.body;
        yield prisma_1.default.prospecting.create({
            data: {
                firstName: data.firstName,
                lastName: data.lastName,
                phoneNumber: data.phoneNumber,
                email: data.email.toLowerCase(),
                activity: data.activity,
                needForProspecting: data.needForProspecting,
            },
        });
        return reply.code(200).send({ message: "success" });
    });
}
// ------------------------------------------------------------------------------------
