"use client";
/**
 * ChatSendButton 发送按钮
 *
 * 
 *
 * 视觉：
 *   - 默认：粉色背景 + 渐变边缘
 *   - 聚焦 / 激活：完整 primaryGradient（accent → 透明）
 *
 * 图标：空输入显示 <Plus />，有内容时显示 <ArrowUp />
 */
import { ArrowUp, Plus } from "lucide-react";

import styles from "./chat-send-button.module.css";

export interface ChatSendButtonProps {
  disabled: boolean;
  hasContent: boolean;
  isExpanded?: boolean;
  onClick: () => void;
}

export function ChatSendButton({
  disabled,
  hasContent,
  isExpanded = false,
  onClick,
}: ChatSendButtonProps) {
  const Icon = hasContent ? ArrowUp : Plus;
  const ariaLabel = hasContent ? "Send message" : "Open chat actions";

  return (
    <button
      type="button"
      className={`${styles.button} ${disabled ? "" : styles.buttonActive}`}
      disabled={disabled}
      onClick={onClick}
      aria-expanded={hasContent ? undefined : isExpanded}
      aria-label={ariaLabel}
    >
      <Icon className={styles.icon} size={24} aria-hidden="true" />
    </button>
  );
}
