import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { DropDownButton, DropdownChildButton } from "../..";
import "./style.scss";
import MultiChart from "./MultiChart";
const CompanyViewFinancialSummary = ({ stockPerformance, Revenue, earning, revenueAndEarningError = false, stockPerformanceError = false, stockPerformanceLoading = false, revenueAndEarningLoading = false, summaryFinancialButton, setsummaryFinancialButton, }) => {
    const financialSummaryButton = [
        "Revenue",
        "Earnings",
        "Combined",
        "Stock Performance",
    ];
    return (_jsxs("div", { className: "companyViewFinancialSummary--Container", children: [_jsxs("div", { className: "companyViewFinancialSummary-Header", children: [_jsx("div", { children: _jsx("h3", { children: "Financial Highlights" }) }), _jsx("div", { className: "dropDownContainer", children: _jsx(DropDownButton, { dropDownText: summaryFinancialButton, maxWidth: "fit-content", children: financialSummaryButton.map((type, key) => {
                                return (_jsx(DropdownChildButton, { onClick: () => {
                                        setsummaryFinancialButton(type);
                                    }, text: type }, key));
                            }) }) })] }), _jsx("div", { className: "companyViewFinancialSummary-Charts", children: MultiChart({
                    selected: summaryFinancialButton,
                    chartDetails: {
                        stockPerformance,
                        Revenue,
                        earning,
                        revenueAndEarningError,
                        stockPerformanceError,
                        stockPerformanceLoading,
                        revenueAndEarningLoading,
                    },
                }) })] }));
};
export default CompanyViewFinancialSummary;
