import React, { useMemo } from "react";
import { useTranslation } from "react-i18next";
import * as styles from "./styles";
import { useDemographics } from "~/sdks/LocalDemographics/context";
import { DEFAULT_RADIUS } from "~/sdks/LocalDemographics/constants";
import { Text } from "~/components/deprecated";
import { AttributionDeprecated as Attribution } from "~/components/Attribution";
export const Footer = () => {
    const { t } = useTranslation(["localDemographics", "common"]);
    const { demographicsState, locale, hideAttribution } = useDemographics();
    const { country } = demographicsState;
    const value = useMemo(() => country === "CAN"
        ? DEFAULT_RADIUS
        : (DEFAULT_RADIUS * 0.000621371).toFixed(2), [country]);
    const unit = useMemo(() => t(`common:distance.${country === "CAN" ? "meter" : "mile"}`), [locale, country]);
    return (React.createElement("div", { className: styles.container },
        React.createElement(Text, { noMargin: true, variant: "caption1", color: "--ll-color-on-background-variant1" }, t("note", { value, unit })),
        !hideAttribution && (React.createElement(Attribution, { sdkName: "local-demographics", locale: locale }))));
};
//# sourceMappingURL=index.js.map