"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Link from "next/link";
import { Text } from "../../../components/atoms/Text";
import { Icon } from "../../../components/atoms/Icon";
import { cn } from "../../../utils/cn";
/**
 * Back Link Molecule Component
 * Reusable back navigation link with arrow icon
 */
export const BackLink = ({ href, label = "Back", className, iconClassName, testId, }) => {
    const link = (_jsxs(Link, { href: href, className: cn("inline-flex items-center gap-2 text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white mb-8 transition-colors", className), children: [_jsx(Icon, { name: "arrowLeft", size: "md", className: iconClassName, testId: testId ? `${testId}.icon` : undefined }), _jsx(Text, { variant: "body", className: "font-medium", testId: testId ? `${testId}.label` : undefined, children: label })] }));
    if (testId) {
        return _jsx("span", { "data-testid": testId, children: link });
    }
    return link;
};
export default BackLink;
