import { c as _c } from "react/compiler-runtime"; import figures from 'figures'; import React from 'react'; import { Box, Text } from '../../../ink.js'; import type { Question } from '../../../tools/AskUserQuestionTool/AskUserQuestionTool.js'; import type { PermissionDecision } from '../../../utils/permissions/PermissionResult.js'; import { Select } from '../../CustomSelect/index.js'; import { Divider } from '../../design-system/Divider.js'; import { PermissionRequestTitle } from '../PermissionRequestTitle.js'; import { PermissionRuleExplanation } from '../PermissionRuleExplanation.js'; import { QuestionNavigationBar } from './QuestionNavigationBar.js'; type Props = { questions: Question[]; currentQuestionIndex: number; answers: Record; allQuestionsAnswered: boolean; permissionResult: PermissionDecision; minContentHeight?: number; onFinalResponse: (value: 'submit' | 'cancel') => void; }; export function SubmitQuestionsView(t0) { const $ = _c(27); const { questions, currentQuestionIndex, answers, allQuestionsAnswered, permissionResult, minContentHeight, onFinalResponse } = t0; let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t1 = ; $[0] = t1; } else { t1 = $[0]; } let t2; if ($[1] !== answers || $[2] !== currentQuestionIndex || $[3] !== questions) { t2 = ; $[1] = answers; $[2] = currentQuestionIndex; $[3] = questions; $[4] = t2; } else { t2 = $[4]; } let t3; if ($[5] === Symbol.for("react.memo_cache_sentinel")) { t3 = ; $[5] = t3; } else { t3 = $[5]; } let t4; if ($[6] !== allQuestionsAnswered) { t4 = !allQuestionsAnswered && {figures.warning} You have not answered all questions; $[6] = allQuestionsAnswered; $[7] = t4; } else { t4 = $[7]; } let t5; if ($[8] !== answers || $[9] !== questions) { t5 = Object.keys(answers).length > 0 && {questions.filter(q => q?.question && answers[q.question]).map(q_0 => { const answer = answers[q_0?.question]; return {figures.bullet} {q_0?.question || "Question"}{figures.arrowRight} {answer}; })}; $[8] = answers; $[9] = questions; $[10] = t5; } else { t5 = $[10]; } let t6; if ($[11] !== permissionResult) { t6 = ; $[11] = permissionResult; $[12] = t6; } else { t6 = $[12]; } let t7; if ($[13] === Symbol.for("react.memo_cache_sentinel")) { t7 = Ready to submit your answers?; $[13] = t7; } else { t7 = $[13]; } let t8; if ($[14] === Symbol.for("react.memo_cache_sentinel")) { t8 = { type: "text" as const, label: "Submit answers", value: "submit" }; $[14] = t8; } else { t8 = $[14]; } let t9; if ($[15] === Symbol.for("react.memo_cache_sentinel")) { t9 = [t8, { type: "text" as const, label: "Cancel", value: "cancel" }]; $[15] = t9; } else { t9 = $[15]; } let t10; if ($[16] !== onFinalResponse) { t10 =