import { c as _c } from "react/compiler-runtime"; import React, { useCallback } from 'react'; import { logEvent } from 'src/services/analytics/index.js'; import { Box, Link, Text } from '../ink.js'; import type { ExternalClaudeMdInclude } from '../utils/claudemd.js'; import { saveCurrentProjectConfig } from '../utils/config.js'; import { Select } from './CustomSelect/index.js'; import { Dialog } from './design-system/Dialog.js'; type Props = { onDone(): void; isStandaloneDialog?: boolean; externalIncludes?: ExternalClaudeMdInclude[]; }; export function ClaudeMdExternalIncludesDialog(t0) { const $ = _c(18); const { onDone, isStandaloneDialog, externalIncludes } = 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] !== onDone) { t2 = value => { if (value === "no") { logEvent("tengu_claude_md_external_includes_dialog_declined", {}); saveCurrentProjectConfig(_temp2); } else { logEvent("tengu_claude_md_external_includes_dialog_accepted", {}); saveCurrentProjectConfig(_temp3); } onDone(); }; $[1] = onDone; $[2] = t2; } else { t2 = $[2]; } const handleSelection = t2; let t3; if ($[3] !== handleSelection) { t3 = () => { handleSelection("no"); }; $[3] = handleSelection; $[4] = t3; } else { t3 = $[4]; } const handleEscape = t3; const t4 = !isStandaloneDialog; const t5 = !isStandaloneDialog; let t6; if ($[5] === Symbol.for("react.memo_cache_sentinel")) { t6 = This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories.; $[5] = t6; } else { t6 = $[5]; } let t7; if ($[6] !== externalIncludes) { t7 = externalIncludes && externalIncludes.length > 0 && External imports:{externalIncludes.map(_temp4)}; $[6] = externalIncludes; $[7] = t7; } else { t7 = $[7]; } let t8; if ($[8] === Symbol.for("react.memo_cache_sentinel")) { t8 = Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks{" "}{" "}; $[8] = t8; } else { t8 = $[8]; } let t9; if ($[9] === Symbol.for("react.memo_cache_sentinel")) { t9 = [{ label: "Yes, allow external imports", value: "yes" }, { label: "No, disable external imports", value: "no" }]; $[9] = t9; } else { t9 = $[9]; } let t10; if ($[10] !== handleSelection) { t10 =