interface AppHeaderProps {
  title: string;
  showBack?: boolean;
  onBack?: () => void;
  rightActions?: React.ReactNode;
}

export default function AppHeader({ title, showBack, onBack, rightActions }: AppHeaderProps) {
  return (
    <div className="app-header">
      <h2 className="app-header-title">{title}</h2>
      <div className="app-header-right">
        {showBack && onBack && (
          <button className="page-back-btn" onClick={onBack}>
            返回
            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
              <polyline points="9 18 15 12 9 6" />
            </svg>
          </button>
        )}
        {rightActions}
      </div>
    </div>
  );
}
