import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
import { useState } from "react";
import CompanyViewSummary from "../CompanyViewSummary";
import { companyViewSummaryTypesPayload } from "../../../utils";
import CompanyViewPeople from "../CompanyViewPeople";
import CompanyViewFinancial from "../CompanyViewFinancial";
const CompanyViewBody = ({ companyViewActiveTab = "Summary", companyViewSummaryPayload = companyViewSummaryTypesPayload,
// companyViewCompetitorwPayload,
// companyViewFinancialPayload,
// companyViewProductsPayload,
 }) => {
    const [companyViewPeopleActiveTab, setCompanyViewPeopleActiveTab] = useState("Current");
    const [companyViewFinancialActiveTab, setCompanyViewFinancialActiveTab] = useState("Summary");
    switch (companyViewActiveTab) {
        case "Summary":
            return (_jsx(CompanyViewSummary, { about: companyViewSummaryPayload.about, industries: companyViewSummaryPayload.industries, employeeCount: companyViewSummaryPayload.employeeCount, websiteUrl: companyViewSummaryPayload.websiteUrl, headquarter: companyViewSummaryPayload.headquarter }));
            break;
        case "People":
            return (_jsx(CompanyViewPeople, { activeCompanyViewPeopleTab: companyViewPeopleActiveTab, onCompanyViewPeopleTabClick: (tab) => {
                    if (tab == "Current") {
                        setCompanyViewPeopleActiveTab("Current");
                    }
                    else if (tab == "Previous") {
                        setCompanyViewPeopleActiveTab("Previous");
                    }
                } }));
            break;
        case "Financials":
            return (_jsx(CompanyViewFinancial, { activeCompanyViewFinancialTab: companyViewFinancialActiveTab, onCompanyViewFinancialTabClick: (tab) => {
                    if (tab === "Summary") {
                        setCompanyViewFinancialActiveTab("Summary");
                    }
                    else if (tab === "Income Statement") {
                        setCompanyViewFinancialActiveTab("Income Statement");
                    }
                    else if (tab === "Balance Sheet") {
                        setCompanyViewFinancialActiveTab("Balance Sheet");
                    }
                    else if (tab === "Cash Flow") {
                        setCompanyViewFinancialActiveTab("Cash Flow");
                    }
                } }));
            break;
        case "Products":
            return (
            // <CompanyProductsTab
            //   onNameClick={function (url: String): void {
            //     throw new Error('Function not implemented.');
            //   }}
            //   products={companyViewProductsPayload.products}
            // />
            _jsx(_Fragment, {}));
            break;
        case "Competitors":
            return (
            // <CompetitorsCompanyTab
            //   onNameClick={function (url: String): void {
            //     throw new Error('Function not implemented.');
            //   }}
            //   competitors={companyViewCompetitorwPayload.competitors}
            // />
            _jsx(_Fragment, {}));
            break;
        default:
            return _jsx(_Fragment, {});
            break;
    }
};
export default CompanyViewBody;
