"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { useSessionWriteBacks } from "../useSessionWriteBacks.js";
import { WriteBackCard } from "../../execution/WriteBackCard.js";
/**
 * Changes facet for the session panel — the session's git write-backs
 * (branch/commit/PR), one `WriteBackCard` per entry.
 *
 * Local file changes deliberately do NOT render here: they live in the
 * transcript, where each stamped edit row shows its diff in place and the
 * per-turn decision bar carries the review controls and file list
 * (`FileReviewCard`). Duplicating them in a side panel gave the same change a
 * third rendering with no added authority. The facet therefore only surfaces
 * once a write-back exists (see `useSessionRailViews`).
 */
export function ChangesTab({ executions }) {
    const { writeBacks, hasWriteBacks } = useSessionWriteBacks(executions);
    if (hasWriteBacks) {
        return (_jsx("div", { role: "list", className: "space-y-2", children: writeBacks.map((entry) => (_jsx("div", { role: "listitem", children: _jsx(WriteBackCard, { writeBack: entry.writeBack }) }, entry.writeBack.workspaceEntryName))) }));
    }
    return (_jsx("div", { className: "flex flex-col items-center justify-center px-4 py-8 text-center", children: _jsx("p", { className: "text-xs text-muted-foreground", children: "No changes yet. Pull requests will appear here once the agent pushes its work back to your repository." }) }));
}
//# sourceMappingURL=ChangesTab.js.map