"use client";
/**
 * 订阅页返回箭头
 *
 * 视觉规格（与设计稿对齐）：
 *   - 24×24 chevron-left 图标
 *   - 黑色，2px 描边
 *   - 无 "Back" 文本
 */
import { ChevronLeft } from "lucide-react";
import Link from "next/link";

import { ROUTES } from "@/router/routes";

import styles from "./subscription-back-link.module.css";

export interface SubscriptionBackLinkProps {
  className?: string;
  href?: string;
}

export function SubscriptionBackLink({
  className,
  href = ROUTES.sidebar,
}: SubscriptionBackLinkProps) {
  return (
    <Link
      href={href}
      aria-label="Back"
      className={[styles.backLink, className].filter(Boolean).join(" ")}
    >
      <ChevronLeft
        size={24}
        strokeWidth={2}
        aria-hidden="true"
        className={styles.icon}
      />
    </Link>
  );
}
