import { c as _c } from "react/compiler-runtime"; import * as React from 'react'; import { Box, Text } from '../../ink.js'; import { useKeybinding } from '../../keybindings/useKeybinding.js'; import type { PromptRequest } from '../../types/hooks.js'; import { Select } from '../CustomSelect/select.js'; import { PermissionDialog } from '../permissions/PermissionDialog.js'; type Props = { title: string; toolInputSummary?: string | null; request: PromptRequest; onRespond: (key: string) => void; onAbort: () => void; }; export function PromptDialog(t0) { const $ = _c(15); const { title, toolInputSummary, request, onRespond, onAbort } = t0; let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t1 = { isActive: true }; $[0] = t1; } else { t1 = $[0]; } useKeybinding("app:interrupt", onAbort, t1); let t2; if ($[1] !== request.options) { t2 = request.options.map(_temp); $[1] = request.options; $[2] = t2; } else { t2 = $[2]; } const options = t2; let t3; if ($[3] !== toolInputSummary) { t3 = toolInputSummary ? {toolInputSummary} : undefined; $[3] = toolInputSummary; $[4] = t3; } else { t3 = $[4]; } let t4; if ($[5] !== onRespond) { t4 = value => { onRespond(value); }; $[5] = onRespond; $[6] = t4; } else { t4 = $[6]; } let t5; if ($[7] !== options || $[8] !== t4) { t5 =