import React from "react";
import { useTranslation } from "react-i18next";
import * as Sections from "../Sections";
import * as styles from "./styles";
import { useNeighborhoodDemographics } from "~/sdks/NeighborhoodDemographics/context";
import { NoDataContentDeprecated } from "~/components/NoDataContent";
import { LoadingSpinner } from "~/components/deprecated";
export const Content = () => {
    const { t } = useTranslation("neighborhoodDemographics");
    const { isLoading, demographicsData } = useNeighborhoodDemographics();
    return (React.createElement(React.Fragment, null,
        isLoading && (React.createElement("div", { className: styles.spinner },
            React.createElement(LoadingSpinner, { image: true }))),
        !isLoading &&
            (!demographicsData || Object.keys(demographicsData).length === 0) && (React.createElement(NoDataContentDeprecated, { text: t("noData") })),
        demographicsData && (React.createElement(Sections.Root, null,
            React.createElement(Sections.Income, null),
            React.createElement(Sections.Population, null),
            React.createElement(Sections.Housing, null),
            React.createElement(Sections.Household, null),
            React.createElement(Sections.Education, null),
            React.createElement(Sections.Commute, null),
            React.createElement(Sections.Languages, null)))));
};
//# sourceMappingURL=index.js.map