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

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

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

export interface SubscriptionBackLinkProps {
  className?: string;
}

export function SubscriptionBackLink({ className }: SubscriptionBackLinkProps) {
  return (
    <Link
      href={ROUTES.sidebar}
      aria-label="Back"
      className={[styles.backLink, className].filter(Boolean).join(" ")}
    >
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        fill="none"
        aria-hidden="true"
        className={styles.icon}
      >
        <path
          d="M15 6l-6 6 6 6"
          stroke="currentColor"
          strokeWidth="2"
          strokeLinecap="round"
          strokeLinejoin="round"
        />
      </svg>
    </Link>
  );
}
