import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useMemo } from "react";
import { createStyles, rem, Group, Text, Stack, UnstyledButton, Anchor, } from "@mantine/core";
import { IconBrandNpm } from "@tabler/icons-react";
import { Analytics, EventAction, EventCategory } from "../../../utils";
var useStyles = createStyles(function (theme) {
    var _a;
    return ({
        footer: {
            position: "static",
            bottom: 0,
            zIndex: 100,
            borderTop: "".concat(rem(1), " solid ").concat(theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[2]),
        },
        inner: (_a = {
                display: "flex",
                justifyContent: "space-between",
                alignItems: "center",
                padding: "".concat(rem(20), " ").concat(rem(60))
            },
            _a[theme.fn.smallerThan("xs")] = {
                flexDirection: "column",
            },
            _a),
    });
});
export var Footer = function () {
    var classes = useStyles().classes;
    var year = new Date().getFullYear();
    var FONT_SIZE = rem(14);
    var FooterLeft = useMemo(function () { return (_jsx(Stack, { children: _jsxs(Text, { size: FONT_SIZE, children: ["\u00A9 ", year, "  ", _jsx(UnstyledButton, { children: _jsx(Anchor, { underline: false, size: "sm", children: "Rushi Patel" }) })] }) })); }, [FONT_SIZE, year]);
    var FooterCenter = useMemo(function () { return (_jsx(Stack, { align: "center", children: _jsx(Text, { size: FONT_SIZE, children: "Made with \u2764\uFE0F from India" }) })); }, [FONT_SIZE]);
    var FooterRight = useMemo(function () { return (_jsx(UnstyledButton, { children: _jsx(Anchor, { href: "https://npmjs.com/package/react-mantine-table", target: "_blank", rel: "noopener noreferrer", underline: false, size: "sm", onClick: function () {
                return Analytics.trackEvent({
                    category: EventCategory.NPMPackage,
                    action: EventAction.Click,
                    label: "Footer",
                });
            }, children: _jsxs(Group, { children: [_jsx(IconBrandNpm, { size: 20 }), _jsx(Text, { ml: -8, children: "NPM Package" })] }) }) })); }, []);
    return (_jsx("footer", { className: classes.footer, children: _jsxs("div", { className: classes.inner, children: [FooterLeft, FooterCenter, FooterRight] }) }));
};
