import { c as _c } from "react/compiler-runtime"; import React, { useCallback } from 'react'; import { logEvent } from 'src/services/analytics/index.js'; import { Box, Link, Newline, Text } from '../ink.js'; import { gracefulShutdownSync } from '../utils/gracefulShutdown.js'; import { updateSettingsForSource } from '../utils/settings/settings.js'; import { Select } from './CustomSelect/index.js'; import { Dialog } from './design-system/Dialog.js'; type Props = { onAccept(): void; }; export function BypassPermissionsModeDialog(t0) { const $ = _c(7); const { onAccept } = t0; let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t1 = []; $[0] = t1; } else { t1 = $[0]; } React.useEffect(_temp, t1); let t2; if ($[1] !== onAccept) { t2 = function onChange(value) { bb3: switch (value) { case "accept": { logEvent("tengu_bypass_permissions_mode_dialog_accept", {}); updateSettingsForSource("userSettings", { skipDangerousModePermissionPrompt: true }); onAccept(); break bb3; } case "decline": { gracefulShutdownSync(1); } } }; $[1] = onAccept; $[2] = t2; } else { t2 = $[2]; } const onChange = t2; const handleEscape = _temp2; let t3; if ($[3] === Symbol.for("react.memo_cache_sentinel")) { t3 = In Bypass Permissions mode, Claude Code will not ask for your approval before running potentially dangerous commands.This mode should only be used in a sandboxed container/VM that has restricted internet access and can easily be restored if damaged.By proceeding, you accept all responsibility for actions taken while running in Bypass Permissions mode.; $[3] = t3; } else { t3 = $[3]; } let t4; if ($[4] === Symbol.for("react.memo_cache_sentinel")) { t4 = [{ label: "No, exit", value: "decline" }, { label: "Yes, I accept", value: "accept" }]; $[4] = t4; } else { t4 = $[4]; } let t5; if ($[5] !== onChange) { t5 = {t3}