"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { useSessionWriteBacks } from "../useSessionWriteBacks";
import { WriteBackCard } from "../../execution/WriteBackCard";
/**
 * Changes facet for the SessionInspector.
 *
 * Wraps the existing `useSessionWriteBacks` hook and renders
 * `WriteBackCard` per write-back entry — the same content as
 * `WriteBacksWidget` but without its section heading (the tab
 * label provides that context).
 */
export function ChangesTab({ executions }) {
    const { writeBacks, hasWriteBacks } = useSessionWriteBacks(executions);
    if (!hasWriteBacks) {
        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 pull requests yet. Changes will appear here when the agent writes back to a workspace." }) }));
    }
    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))) }));
}
//# sourceMappingURL=ChangesTab.js.map