import React from "react";
import { useTranslation } from "react-i18next";
import { Card } from "../Card";
import * as styles from "./styles";
import { useNeighborhoodPropertyValueDrivers } from "~/sdks/NeighborhoodPropertyValueDrivers/context";
import { NoDataContentDeprecated } from "~/components/NoDataContent";
import { LoadingSpinner } from "~/components/deprecated";
export const Content = () => {
    const { t } = useTranslation("neighborhoodPropertyValueDrivers");
    const { propertyValueDrivers, isLoading, geography } = useNeighborhoodPropertyValueDrivers();
    const locationType = ((geography === null || geography === void 0 ? void 0 : geography.level) || 10) >= 30
        ? t("locationType.location")
        : t("locationType.neighborhood");
    return (React.createElement(React.Fragment, null,
        isLoading && (React.createElement("div", { className: styles.loadingContent },
            React.createElement(LoadingSpinner, { image: true }))),
        !isLoading &&
            propertyValueDrivers &&
            propertyValueDrivers.length > 0 && (React.createElement("div", { className: styles.content }, propertyValueDrivers &&
            propertyValueDrivers.map((driver) => (React.createElement(Card, { key: driver.name, driver: driver, locationType: locationType }))))),
        !isLoading && !propertyValueDrivers && (React.createElement(NoDataContentDeprecated, { text: t("noData", { locationType }) }))));
};
//# sourceMappingURL=index.js.map