(t0)
| 21 | * including session selection, loading state, and error handling |
| 22 | */ |
| 23 | export function TeleportResumeWrapper(t0) { |
| 24 | const $ = _c(25); |
| 25 | const { |
| 26 | onComplete, |
| 27 | onCancel, |
| 28 | onError, |
| 29 | isEmbedded: t1, |
| 30 | source |
| 31 | } = t0; |
| 32 | const isEmbedded = t1 === undefined ? false : t1; |
| 33 | const { |
| 34 | resumeSession, |
| 35 | isResuming, |
| 36 | error, |
| 37 | selectedSession |
| 38 | } = useTeleportResume(source); |
| 39 | let t2; |
| 40 | let t3; |
| 41 | if ($[0] !== source) { |
| 42 | t2 = () => { |
| 43 | logEvent("tengu_teleport_started", { |
| 44 | source: source as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS |
| 45 | }); |
| 46 | }; |
| 47 | t3 = [source]; |
| 48 | $[0] = source; |
| 49 | $[1] = t2; |
| 50 | $[2] = t3; |
| 51 | } else { |
| 52 | t2 = $[1]; |
| 53 | t3 = $[2]; |
| 54 | } |
| 55 | useEffect(t2, t3); |
| 56 | let t4; |
| 57 | if ($[3] !== error || $[4] !== onComplete || $[5] !== onError || $[6] !== resumeSession) { |
| 58 | t4 = async session => { |
| 59 | const result = await resumeSession(session); |
| 60 | if (result) { |
| 61 | onComplete(result); |
| 62 | } else { |
| 63 | if (error) { |
| 64 | if (onError) { |
| 65 | onError(error.message, error.formattedMessage); |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | }; |
| 70 | $[3] = error; |
| 71 | $[4] = onComplete; |
| 72 | $[5] = onError; |
| 73 | $[6] = resumeSession; |
| 74 | $[7] = t4; |
| 75 | } else { |
| 76 | t4 = $[7]; |
| 77 | } |
| 78 | const handleSelect = t4; |
| 79 | let t5; |
| 80 | if ($[8] !== onCancel) { |
nothing calls this directly
no test coverage detected