import { TKMindAvatar } from './TKMindAvatar';

export function SpaceChatFab({
  open,
  streaming,
  pendingTool,
  onClick,
}: {
  open: boolean;
  streaming: boolean;
  pendingTool: boolean;
  onClick: () => void;
}) {
  return (
    <button
      type="button"
      className={`space-chat-fab${open ? ' is-open' : ''}${streaming ? ' is-streaming' : ''}${pendingTool ? ' has-pending-tool' : ''}`}
      aria-label={open ? '关闭 Agent 对话' : '打开 Agent 对话'}
      aria-expanded={open}
      onClick={onClick}
    >
      <TKMindAvatar size="sm" />
      {pendingTool && <span className="space-chat-fab-badge" aria-hidden="true" />}
    </button>
  );
}
