import { memo } from "react"; import { type PendingApproval } from "../../session-logic"; interface ComposerPendingApprovalPanelProps { approval: PendingApproval; pendingCount: number; } export const ComposerPendingApprovalPanel = memo(function ComposerPendingApprovalPanel({ approval, pendingCount, }: ComposerPendingApprovalPanelProps) { const approvalSummary = approval.requestKind === "command" ? "Command approval requested" : approval.requestKind === "file-read" ? "File-read approval requested" : "File-change approval requested"; const detailLabel = approval.requestKind === "command" ? "Command" : approval.requestKind === "file-read" ? "File to read" : "File change"; return (
PENDING APPROVAL {approvalSummary} {pendingCount > 1 ? ( 1/{pendingCount} ) : null}
{approval.detail ? (

{detailLabel}

            {approval.detail}
          
) : null}
); });