@dubsdotapp/expo 0.2.78 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -37,6 +37,7 @@ __export(index_exports, {
37
37
  CreateCustomGameSheet: () => CreateCustomGameSheet,
38
38
  DEFAULT_BASE_URL: () => DEFAULT_BASE_URL,
39
39
  DEFAULT_RPC_URL: () => DEFAULT_RPC_URL,
40
+ DeveloperDashboardSheet: () => DeveloperDashboardSheet,
40
41
  DubsApiError: () => DubsApiError,
41
42
  DubsClient: () => DubsClient,
42
43
  DubsProvider: () => DubsProvider,
@@ -595,6 +596,31 @@ var DubsClient = class {
595
596
  }
596
597
  return config;
597
598
  }
599
+ // ── Developer Commissions ──
600
+ /** Fetch paginated list of commission earnings for this app */
601
+ async getCommissions(params) {
602
+ const qs = new URLSearchParams();
603
+ if (params?.limit != null) qs.set("limit", String(params.limit));
604
+ if (params?.offset != null) qs.set("offset", String(params.offset));
605
+ const query = qs.toString();
606
+ const res = await this.request(
607
+ "GET",
608
+ `/commissions${query ? `?${query}` : ""}`
609
+ );
610
+ return {
611
+ commissions: res.commissions,
612
+ summary: res.summary,
613
+ pagination: res.pagination
614
+ };
615
+ }
616
+ /** Fetch a quick summary of commission earnings for this app */
617
+ async getCommissionsSummary() {
618
+ const res = await this.request(
619
+ "GET",
620
+ "/commissions/summary"
621
+ );
622
+ return res.summary;
623
+ }
598
624
  };
599
625
 
600
626
  // src/storage.ts
@@ -3709,6 +3735,7 @@ function UserProfileSheet({
3709
3735
  }) {
3710
3736
  const t = useDubsTheme();
3711
3737
  const { client } = useDubs();
3738
+ const { refreshUser } = useAuth();
3712
3739
  const push = usePushNotifications();
3713
3740
  const overlayOpacity = (0, import_react20.useRef)(new import_react_native11.Animated.Value(0)).current;
3714
3741
  const parsed = (0, import_react20.useMemo)(() => parseAvatarUrl(user.avatar), [user.avatar]);
@@ -3739,13 +3766,14 @@ function UserProfileSheet({
3739
3766
  setError(null);
3740
3767
  try {
3741
3768
  await client.updateProfile({ avatar: newUrl });
3769
+ await refreshUser();
3742
3770
  onAvatarUpdated?.(newUrl);
3743
3771
  } catch (err) {
3744
3772
  setError(err instanceof Error ? err.message : "Failed to update avatar");
3745
3773
  } finally {
3746
3774
  setSaving(false);
3747
3775
  }
3748
- }, [client, onAvatarUpdated]);
3776
+ }, [client, refreshUser, onAvatarUpdated]);
3749
3777
  const handleStyleChange = (0, import_react20.useCallback)((style) => {
3750
3778
  setAvatarStyle(style);
3751
3779
  saveAvatar(getAvatarUrl(style, avatarSeed, bgColor));
@@ -4034,10 +4062,308 @@ var styles5 = import_react_native11.StyleSheet.create({
4034
4062
  }
4035
4063
  });
4036
4064
 
4037
- // src/ui/game/GamePoster.tsx
4065
+ // src/ui/DeveloperDashboardSheet.tsx
4038
4066
  var import_react21 = require("react");
4039
4067
  var import_react_native12 = require("react-native");
4040
4068
  var import_jsx_runtime9 = require("react/jsx-runtime");
4069
+ function DeveloperDashboardSheet({ visible, onDismiss }) {
4070
+ const t = useDubsTheme();
4071
+ const { client } = useDubs();
4072
+ const [summary, setSummary] = (0, import_react21.useState)(null);
4073
+ const [commissions, setCommissions] = (0, import_react21.useState)([]);
4074
+ const [loading, setLoading] = (0, import_react21.useState)(false);
4075
+ const [error, setError] = (0, import_react21.useState)(null);
4076
+ const overlayOpacity = (0, import_react21.useRef)(new import_react_native12.Animated.Value(0)).current;
4077
+ (0, import_react21.useEffect)(() => {
4078
+ import_react_native12.Animated.timing(overlayOpacity, {
4079
+ toValue: visible ? 1 : 0,
4080
+ duration: 250,
4081
+ useNativeDriver: true
4082
+ }).start();
4083
+ }, [visible, overlayOpacity]);
4084
+ const fetchData = (0, import_react21.useCallback)(async () => {
4085
+ setLoading(true);
4086
+ setError(null);
4087
+ try {
4088
+ const result = await client.getCommissions({ limit: 50 });
4089
+ setCommissions(result.commissions);
4090
+ setSummary(result.summary);
4091
+ } catch (err) {
4092
+ setError(err instanceof Error ? err.message : "Failed to load commissions");
4093
+ } finally {
4094
+ setLoading(false);
4095
+ }
4096
+ }, [client]);
4097
+ (0, import_react21.useEffect)(() => {
4098
+ if (visible) fetchData();
4099
+ }, [visible, fetchData]);
4100
+ const formatSol = (sol) => {
4101
+ if (sol === 0) return "0";
4102
+ if (sol < 1e-3) return "<0.001";
4103
+ return sol.toFixed(3);
4104
+ };
4105
+ const renderCommission = ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.row, { backgroundColor: t.surface, borderColor: t.border }], children: [
4106
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.rowTop, children: [
4107
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Text, { style: [styles6.rowGameId, { color: t.text }], numberOfLines: 1, children: [
4108
+ item.gameId.slice(0, 16),
4109
+ "..."
4110
+ ] }),
4111
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Text, { style: [styles6.rowAmount, { color: t.success }], children: [
4112
+ "+",
4113
+ formatSol(item.amountSol),
4114
+ " SOL"
4115
+ ] })
4116
+ ] }),
4117
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.rowBottom, children: [
4118
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Text, { style: [styles6.rowMeta, { color: t.textMuted }], children: [
4119
+ item.gameType || "game",
4120
+ " | pot ",
4121
+ formatSol(item.potSizeSol),
4122
+ " SOL"
4123
+ ] }),
4124
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: [
4125
+ styles6.statusBadge,
4126
+ { backgroundColor: item.status === "paid" ? t.success + "22" : t.accent + "22" }
4127
+ ], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [
4128
+ styles6.statusText,
4129
+ { color: item.status === "paid" ? t.success : t.accent }
4130
+ ], children: item.status }) })
4131
+ ] }),
4132
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.rowDate, { color: t.textDim }], children: new Date(item.createdAt).toLocaleDateString() })
4133
+ ] });
4134
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Modal, { visible, animationType: "slide", transparent: true, onRequestClose: onDismiss, children: [
4135
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Animated.View, { style: [styles6.overlay, { opacity: overlayOpacity }] }),
4136
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4137
+ import_react_native12.KeyboardAvoidingView,
4138
+ {
4139
+ style: styles6.flex,
4140
+ behavior: import_react_native12.Platform.OS === "ios" ? "padding" : void 0,
4141
+ children: [
4142
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: styles6.flex }),
4143
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.sheet, { backgroundColor: t.background }], children: [
4144
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: styles6.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: [styles6.handle, { backgroundColor: t.textMuted }] }) }),
4145
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.header, children: [
4146
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.headerTitle, { color: t.text }], children: "Commission Earnings" }),
4147
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.TouchableOpacity, { onPress: onDismiss, hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.closeButton, { color: t.textMuted }], children: "\u2715" }) })
4148
+ ] }),
4149
+ summary && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.summaryRow, children: [
4150
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.summaryCard, { backgroundColor: t.surface }], children: [
4151
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.summaryLabel, { color: t.textMuted }], children: "Total Earned" }),
4152
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Text, { style: [styles6.summaryValue, { color: t.success }], children: [
4153
+ formatSol(summary.totalEarnedSol),
4154
+ " SOL"
4155
+ ] })
4156
+ ] }),
4157
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.summaryCard, { backgroundColor: t.surface }], children: [
4158
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.summaryLabel, { color: t.textMuted }], children: "Games" }),
4159
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.summaryValue, { color: t.text }], children: summary.totalGames })
4160
+ ] }),
4161
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.summaryCard, { backgroundColor: t.surface }], children: [
4162
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.summaryLabel, { color: t.textMuted }], children: "Paid" }),
4163
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Text, { style: [styles6.summaryValue, { color: t.accent }], children: [
4164
+ formatSol(summary.totalPaidSol),
4165
+ " SOL"
4166
+ ] })
4167
+ ] })
4168
+ ] }),
4169
+ summary?.commissionWallet && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.walletRow, { backgroundColor: t.surface, borderColor: t.border }], children: [
4170
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.walletLabel, { color: t.textMuted }], children: "Commission Wallet" }),
4171
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.walletAddress, { color: t.textSecondary }], numberOfLines: 1, children: summary.commissionWallet })
4172
+ ] }),
4173
+ loading && !commissions.length ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: styles6.centered, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.ActivityIndicator, { size: "large", color: t.accent }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: [styles6.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: [
4174
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.errorText, { color: t.errorText }], children: error }),
4175
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.TouchableOpacity, { onPress: fetchData, style: [styles6.retryButton, { borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.retryText, { color: t.errorText }], children: "Retry" }) })
4176
+ ] }) : commissions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.centered, children: [
4177
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.emptyTitle, { color: t.textMuted }], children: "No commissions yet" }),
4178
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.emptySubtitle, { color: t.textDim }], children: "When games created through your app are resolved, your 1% commission will appear here." })
4179
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4180
+ import_react_native12.FlatList,
4181
+ {
4182
+ data: commissions,
4183
+ keyExtractor: (item) => String(item.id),
4184
+ renderItem: renderCommission,
4185
+ contentContainerStyle: styles6.listContent,
4186
+ showsVerticalScrollIndicator: false
4187
+ }
4188
+ )
4189
+ ] })
4190
+ ]
4191
+ }
4192
+ )
4193
+ ] });
4194
+ }
4195
+ var styles6 = import_react_native12.StyleSheet.create({
4196
+ flex: { flex: 1 },
4197
+ overlay: {
4198
+ ...import_react_native12.StyleSheet.absoluteFillObject,
4199
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
4200
+ },
4201
+ sheet: {
4202
+ borderTopLeftRadius: 20,
4203
+ borderTopRightRadius: 20,
4204
+ maxHeight: "85%",
4205
+ minHeight: 400,
4206
+ paddingBottom: 34
4207
+ },
4208
+ handleRow: {
4209
+ alignItems: "center",
4210
+ paddingTop: 10,
4211
+ paddingBottom: 6
4212
+ },
4213
+ handle: {
4214
+ width: 36,
4215
+ height: 4,
4216
+ borderRadius: 2,
4217
+ opacity: 0.4
4218
+ },
4219
+ header: {
4220
+ flexDirection: "row",
4221
+ alignItems: "center",
4222
+ justifyContent: "space-between",
4223
+ paddingHorizontal: 20,
4224
+ paddingVertical: 12
4225
+ },
4226
+ headerTitle: {
4227
+ fontSize: 18,
4228
+ fontWeight: "700"
4229
+ },
4230
+ closeButton: {
4231
+ fontSize: 18,
4232
+ fontWeight: "600"
4233
+ },
4234
+ summaryRow: {
4235
+ flexDirection: "row",
4236
+ paddingHorizontal: 16,
4237
+ gap: 8,
4238
+ marginBottom: 12
4239
+ },
4240
+ summaryCard: {
4241
+ flex: 1,
4242
+ borderRadius: 12,
4243
+ padding: 12,
4244
+ alignItems: "center"
4245
+ },
4246
+ summaryLabel: {
4247
+ fontSize: 11,
4248
+ fontWeight: "600",
4249
+ textTransform: "uppercase",
4250
+ letterSpacing: 0.5,
4251
+ marginBottom: 4
4252
+ },
4253
+ summaryValue: {
4254
+ fontSize: 16,
4255
+ fontWeight: "700"
4256
+ },
4257
+ walletRow: {
4258
+ marginHorizontal: 16,
4259
+ borderRadius: 10,
4260
+ borderWidth: 1,
4261
+ padding: 10,
4262
+ marginBottom: 12
4263
+ },
4264
+ walletLabel: {
4265
+ fontSize: 11,
4266
+ fontWeight: "600",
4267
+ textTransform: "uppercase",
4268
+ letterSpacing: 0.5,
4269
+ marginBottom: 2
4270
+ },
4271
+ walletAddress: {
4272
+ fontSize: 12,
4273
+ fontFamily: import_react_native12.Platform.OS === "ios" ? "Menlo" : "monospace"
4274
+ },
4275
+ centered: {
4276
+ flex: 1,
4277
+ justifyContent: "center",
4278
+ alignItems: "center",
4279
+ paddingHorizontal: 32,
4280
+ paddingVertical: 48
4281
+ },
4282
+ emptyTitle: {
4283
+ fontSize: 16,
4284
+ fontWeight: "600",
4285
+ marginBottom: 8
4286
+ },
4287
+ emptySubtitle: {
4288
+ fontSize: 13,
4289
+ textAlign: "center",
4290
+ lineHeight: 18
4291
+ },
4292
+ errorBox: {
4293
+ margin: 16,
4294
+ borderRadius: 10,
4295
+ borderWidth: 1,
4296
+ padding: 16,
4297
+ alignItems: "center"
4298
+ },
4299
+ errorText: {
4300
+ fontSize: 14,
4301
+ marginBottom: 12
4302
+ },
4303
+ retryButton: {
4304
+ borderWidth: 1,
4305
+ borderRadius: 8,
4306
+ paddingHorizontal: 16,
4307
+ paddingVertical: 6
4308
+ },
4309
+ retryText: {
4310
+ fontSize: 13,
4311
+ fontWeight: "600"
4312
+ },
4313
+ listContent: {
4314
+ paddingHorizontal: 16,
4315
+ paddingBottom: 16
4316
+ },
4317
+ row: {
4318
+ borderRadius: 12,
4319
+ borderWidth: 1,
4320
+ padding: 12,
4321
+ marginBottom: 8
4322
+ },
4323
+ rowTop: {
4324
+ flexDirection: "row",
4325
+ justifyContent: "space-between",
4326
+ alignItems: "center",
4327
+ marginBottom: 4
4328
+ },
4329
+ rowGameId: {
4330
+ fontSize: 14,
4331
+ fontWeight: "600",
4332
+ flex: 1,
4333
+ marginRight: 8
4334
+ },
4335
+ rowAmount: {
4336
+ fontSize: 14,
4337
+ fontWeight: "700"
4338
+ },
4339
+ rowBottom: {
4340
+ flexDirection: "row",
4341
+ justifyContent: "space-between",
4342
+ alignItems: "center",
4343
+ marginBottom: 2
4344
+ },
4345
+ rowMeta: {
4346
+ fontSize: 12
4347
+ },
4348
+ statusBadge: {
4349
+ borderRadius: 6,
4350
+ paddingHorizontal: 8,
4351
+ paddingVertical: 2
4352
+ },
4353
+ statusText: {
4354
+ fontSize: 11,
4355
+ fontWeight: "600",
4356
+ textTransform: "uppercase"
4357
+ },
4358
+ rowDate: {
4359
+ fontSize: 11
4360
+ }
4361
+ });
4362
+
4363
+ // src/ui/game/GamePoster.tsx
4364
+ var import_react22 = require("react");
4365
+ var import_react_native13 = require("react-native");
4366
+ var import_jsx_runtime10 = require("react/jsx-runtime");
4041
4367
  function computeCountdown(lockTimestamp) {
4042
4368
  if (!lockTimestamp) return "";
4043
4369
  const ts = typeof lockTimestamp === "string" ? parseInt(lockTimestamp) : lockTimestamp;
@@ -4058,38 +4384,38 @@ function GamePoster({ game, ImageComponent }) {
4058
4384
  const away = opponents[1];
4059
4385
  const countdown = computeCountdown(game.lockTimestamp);
4060
4386
  const isLive = countdown === "LIVE";
4061
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.container, children: [
4062
- game.media?.poster ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4387
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: styles7.container, children: [
4388
+ game.media?.poster ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4063
4389
  Img,
4064
4390
  {
4065
4391
  source: { uri: game.media.poster },
4066
- style: styles6.image,
4392
+ style: styles7.image,
4067
4393
  resizeMode: "cover"
4068
4394
  }
4069
- ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: [styles6.image, { backgroundColor: t.surface }], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.fallback, children: [
4070
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TeamLogoInternal, { url: home?.imageUrl, size: 56, Img }),
4071
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: styles6.vs, children: "VS" }),
4072
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TeamLogoInternal, { url: away?.imageUrl, size: 56, Img })
4395
+ ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: [styles7.image, { backgroundColor: t.surface }], children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: styles7.fallback, children: [
4396
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TeamLogoInternal, { url: home?.imageUrl, size: 56, Img }),
4397
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: styles7.vs, children: "VS" }),
4398
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TeamLogoInternal, { url: away?.imageUrl, size: 56, Img })
4073
4399
  ] }) }),
4074
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: styles6.overlay }),
4075
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.View, { style: styles6.teamNames, children: [
4076
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: styles6.teamNameText, numberOfLines: 1, children: home?.name || "Home" }),
4077
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: styles6.teamNameVs, children: "vs" }),
4078
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: styles6.teamNameText, numberOfLines: 1, children: away?.name || "Away" })
4400
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: styles7.overlay }),
4401
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: styles7.teamNames, children: [
4402
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: styles7.teamNameText, numberOfLines: 1, children: home?.name || "Home" }),
4403
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: styles7.teamNameVs, children: "vs" }),
4404
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: styles7.teamNameText, numberOfLines: 1, children: away?.name || "Away" })
4079
4405
  ] }),
4080
- countdown ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: styles6.countdownPill, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.Text, { style: [styles6.countdownText, isLive && styles6.countdownLive], children: countdown }) }) : null,
4081
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: styles6.poolPill, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native12.Text, { style: styles6.poolText, children: [
4406
+ countdown ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: styles7.countdownPill, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: [styles7.countdownText, isLive && styles7.countdownLive], children: countdown }) }) : null,
4407
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: styles7.poolPill, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: styles7.poolText, children: [
4082
4408
  game.totalPool || 0,
4083
4409
  " SOL"
4084
4410
  ] }) })
4085
4411
  ] });
4086
4412
  }
4087
4413
  function TeamLogoInternal({ url, size, Img }) {
4088
- const [failed, setFailed] = (0, import_react21.useState)(false);
4414
+ const [failed, setFailed] = (0, import_react22.useState)(false);
4089
4415
  if (!url || failed) {
4090
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native12.View, { style: [styles6.logoPlaceholder, { width: size, height: size, borderRadius: size / 2 }] });
4416
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: [styles7.logoPlaceholder, { width: size, height: size, borderRadius: size / 2 }] });
4091
4417
  }
4092
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4418
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4093
4419
  Img,
4094
4420
  {
4095
4421
  source: { uri: url },
@@ -4099,7 +4425,7 @@ function TeamLogoInternal({ url, size, Img }) {
4099
4425
  }
4100
4426
  );
4101
4427
  }
4102
- var styles6 = import_react_native12.StyleSheet.create({
4428
+ var styles7 = import_react_native13.StyleSheet.create({
4103
4429
  container: {
4104
4430
  height: 200,
4105
4431
  borderRadius: 16,
@@ -4107,12 +4433,12 @@ var styles6 = import_react_native12.StyleSheet.create({
4107
4433
  position: "relative"
4108
4434
  },
4109
4435
  image: {
4110
- ...import_react_native12.StyleSheet.absoluteFillObject,
4436
+ ...import_react_native13.StyleSheet.absoluteFillObject,
4111
4437
  justifyContent: "center",
4112
4438
  alignItems: "center"
4113
4439
  },
4114
4440
  overlay: {
4115
- ...import_react_native12.StyleSheet.absoluteFillObject,
4441
+ ...import_react_native13.StyleSheet.absoluteFillObject,
4116
4442
  backgroundColor: "rgba(0,0,0,0.35)"
4117
4443
  },
4118
4444
  fallback: {
@@ -4186,9 +4512,9 @@ var styles6 = import_react_native12.StyleSheet.create({
4186
4512
  });
4187
4513
 
4188
4514
  // src/ui/game/LivePoolsCard.tsx
4189
- var import_react22 = require("react");
4190
- var import_react_native13 = require("react-native");
4191
- var import_jsx_runtime10 = require("react/jsx-runtime");
4515
+ var import_react23 = require("react");
4516
+ var import_react_native14 = require("react-native");
4517
+ var import_jsx_runtime11 = require("react/jsx-runtime");
4192
4518
  function LivePoolsCard({
4193
4519
  game,
4194
4520
  shortName,
@@ -4202,7 +4528,7 @@ function LivePoolsCard({
4202
4528
  const homePool = game.homePool || 0;
4203
4529
  const awayPool = game.awayPool || 0;
4204
4530
  const totalPool = game.totalPool || 0;
4205
- const { homePercent, awayPercent, homeOdds, awayOdds } = (0, import_react22.useMemo)(() => {
4531
+ const { homePercent, awayPercent, homeOdds, awayOdds } = (0, import_react23.useMemo)(() => {
4206
4532
  return {
4207
4533
  homePercent: totalPool > 0 ? homePool / totalPool * 100 : 50,
4208
4534
  awayPercent: totalPool > 0 ? awayPool / totalPool * 100 : 50,
@@ -4210,29 +4536,29 @@ function LivePoolsCard({
4210
4536
  awayOdds: awayPool > 0 ? (totalPool / awayPool).toFixed(2) : "\u2014"
4211
4537
  };
4212
4538
  }, [homePool, awayPool, totalPool]);
4213
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: [styles7.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4214
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: [styles7.title, { color: t.text }], children: "Live Pools" }),
4215
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: [styles7.total, { color: t.accent }], children: [
4539
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.View, { style: [styles8.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4540
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.Text, { style: [styles8.title, { color: t.text }], children: "Live Pools" }),
4541
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: [styles8.total, { color: t.accent }], children: [
4216
4542
  totalPool,
4217
4543
  " SOL total"
4218
4544
  ] }),
4219
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: styles7.bars, children: [
4220
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PoolBar, { name: homeName, amount: homePool, percent: homePercent, color: homeColor, t }),
4221
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PoolBar, { name: awayName, amount: awayPool, percent: awayPercent, color: awayColor, t })
4545
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.View, { style: styles8.bars, children: [
4546
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PoolBar, { name: homeName, amount: homePool, percent: homePercent, color: homeColor, t }),
4547
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PoolBar, { name: awayName, amount: awayPool, percent: awayPercent, color: awayColor, t })
4222
4548
  ] }),
4223
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: styles7.oddsRow, children: [
4224
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: [styles7.oddsText, { color: t.textMuted }], children: [
4549
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.View, { style: styles8.oddsRow, children: [
4550
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: [styles8.oddsText, { color: t.textMuted }], children: [
4225
4551
  homeName,
4226
4552
  ": ",
4227
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: { color: t.text, fontWeight: "700" }, children: [
4553
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: { color: t.text, fontWeight: "700" }, children: [
4228
4554
  homeOdds,
4229
4555
  "x"
4230
4556
  ] })
4231
4557
  ] }),
4232
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: [styles7.oddsText, { color: t.textMuted }], children: [
4558
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: [styles8.oddsText, { color: t.textMuted }], children: [
4233
4559
  awayName,
4234
4560
  ": ",
4235
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: { color: t.text, fontWeight: "700" }, children: [
4561
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: { color: t.text, fontWeight: "700" }, children: [
4236
4562
  awayOdds,
4237
4563
  "x"
4238
4564
  ] })
@@ -4241,16 +4567,16 @@ function LivePoolsCard({
4241
4567
  ] });
4242
4568
  }
4243
4569
  function PoolBar({ name, amount, percent, color, t }) {
4244
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.View, { style: styles7.barRow, children: [
4245
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.Text, { style: [styles7.barLabel, { color: t.textSecondary }], numberOfLines: 1, children: name }),
4246
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: [styles7.barTrack, { backgroundColor: t.border }], children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native13.View, { style: [styles7.barFill, { width: `${Math.max(percent, 2)}%`, backgroundColor: color }] }) }),
4247
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native13.Text, { style: [styles7.barAmount, { color: t.text }], children: [
4570
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.View, { style: styles8.barRow, children: [
4571
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.Text, { style: [styles8.barLabel, { color: t.textSecondary }], numberOfLines: 1, children: name }),
4572
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.View, { style: [styles8.barTrack, { backgroundColor: t.border }], children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.View, { style: [styles8.barFill, { width: `${Math.max(percent, 2)}%`, backgroundColor: color }] }) }),
4573
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: [styles8.barAmount, { color: t.text }], children: [
4248
4574
  amount,
4249
4575
  " SOL"
4250
4576
  ] })
4251
4577
  ] });
4252
4578
  }
4253
- var styles7 = import_react_native13.StyleSheet.create({
4579
+ var styles8 = import_react_native14.StyleSheet.create({
4254
4580
  card: { borderRadius: 16, borderWidth: 1, padding: 16 },
4255
4581
  title: { fontSize: 17, fontWeight: "700", marginBottom: 4 },
4256
4582
  total: { fontSize: 14, fontWeight: "600", marginBottom: 14 },
@@ -4265,9 +4591,9 @@ var styles7 = import_react_native13.StyleSheet.create({
4265
4591
  });
4266
4592
 
4267
4593
  // src/ui/game/PickWinnerCard.tsx
4268
- var import_react23 = require("react");
4269
- var import_react_native14 = require("react-native");
4270
- var import_jsx_runtime11 = require("react/jsx-runtime");
4594
+ var import_react24 = require("react");
4595
+ var import_react_native15 = require("react-native");
4596
+ var import_jsx_runtime12 = require("react/jsx-runtime");
4271
4597
  function PickWinnerCard({
4272
4598
  game,
4273
4599
  selectedTeam,
@@ -4283,7 +4609,7 @@ function PickWinnerCard({
4283
4609
  const totalPool = game.totalPool || 0;
4284
4610
  const homePool = game.homePool || 0;
4285
4611
  const awayPool = game.awayPool || 0;
4286
- const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react23.useMemo)(() => ({
4612
+ const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react24.useMemo)(() => ({
4287
4613
  homeOdds: homePool > 0 ? (totalPool / homePool).toFixed(2) : "\u2014",
4288
4614
  awayOdds: awayPool > 0 ? (totalPool / awayPool).toFixed(2) : "\u2014",
4289
4615
  homeBets: bettors.filter((b) => b.team === "home").length,
@@ -4291,10 +4617,10 @@ function PickWinnerCard({
4291
4617
  }), [totalPool, homePool, awayPool, bettors]);
4292
4618
  const homeName = shortName ? shortName(opponents[0]?.name) : opponents[0]?.name || "Home";
4293
4619
  const awayName = shortName ? shortName(opponents[1]?.name) : opponents[1]?.name || "Away";
4294
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.View, { style: [styles8.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4295
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.Text, { style: [styles8.title, { color: t.text }], children: "Pick Your Winner" }),
4296
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.View, { style: styles8.row, children: [
4297
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4620
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.View, { style: [styles9.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4621
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.Text, { style: [styles9.title, { color: t.text }], children: "Pick Your Winner" }),
4622
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.View, { style: styles9.row, children: [
4623
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4298
4624
  TeamOption,
4299
4625
  {
4300
4626
  name: homeName,
@@ -4308,7 +4634,7 @@ function PickWinnerCard({
4308
4634
  t
4309
4635
  }
4310
4636
  ),
4311
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4637
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4312
4638
  TeamOption,
4313
4639
  {
4314
4640
  name: awayName,
@@ -4336,33 +4662,33 @@ function TeamOption({
4336
4662
  ImageComponent,
4337
4663
  t
4338
4664
  }) {
4339
- const [imgFailed, setImgFailed] = (0, import_react23.useState)(false);
4665
+ const [imgFailed, setImgFailed] = (0, import_react24.useState)(false);
4340
4666
  const Img = ImageComponent || require("react-native").Image;
4341
4667
  const showImage = imageUrl && !imgFailed;
4342
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
4343
- import_react_native14.TouchableOpacity,
4668
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
4669
+ import_react_native15.TouchableOpacity,
4344
4670
  {
4345
- style: [styles8.option, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
4671
+ style: [styles9.option, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
4346
4672
  onPress,
4347
4673
  activeOpacity: 0.7,
4348
4674
  children: [
4349
- showImage ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Img, { source: { uri: imageUrl }, style: styles8.logo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.View, { style: [styles8.logo, styles8.logoPlaceholder] }),
4350
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.Text, { style: [styles8.name, { color: t.text }], numberOfLines: 1, children: name }),
4351
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: [styles8.odds, { color }], children: [
4675
+ showImage ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Img, { source: { uri: imageUrl }, style: styles9.logo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.View, { style: [styles9.logo, styles9.logoPlaceholder] }),
4676
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.Text, { style: [styles9.name, { color: t.text }], numberOfLines: 1, children: name }),
4677
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.Text, { style: [styles9.odds, { color }], children: [
4352
4678
  odds,
4353
4679
  "x"
4354
4680
  ] }),
4355
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native14.Text, { style: [styles8.bets, { color: t.textMuted }], children: [
4681
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.Text, { style: [styles9.bets, { color: t.textMuted }], children: [
4356
4682
  bets,
4357
4683
  " ",
4358
4684
  bets === 1 ? "bet" : "bets"
4359
4685
  ] }),
4360
- selected && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.View, { style: [styles8.badge, { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native14.Text, { style: styles8.badgeText, children: "Selected" }) })
4686
+ selected && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.View, { style: [styles9.badge, { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.Text, { style: styles9.badgeText, children: "Selected" }) })
4361
4687
  ]
4362
4688
  }
4363
4689
  );
4364
4690
  }
4365
- var styles8 = import_react_native14.StyleSheet.create({
4691
+ var styles9 = import_react_native15.StyleSheet.create({
4366
4692
  card: { borderRadius: 16, borderWidth: 1, padding: 16 },
4367
4693
  title: { fontSize: 17, fontWeight: "700", marginBottom: 12 },
4368
4694
  row: { flexDirection: "row", gap: 12 },
@@ -4377,9 +4703,9 @@ var styles8 = import_react_native14.StyleSheet.create({
4377
4703
  });
4378
4704
 
4379
4705
  // src/ui/game/PlayersCard.tsx
4380
- var import_react24 = require("react");
4381
- var import_react_native15 = require("react-native");
4382
- var import_jsx_runtime12 = require("react/jsx-runtime");
4706
+ var import_react25 = require("react");
4707
+ var import_react_native16 = require("react-native");
4708
+ var import_jsx_runtime13 = require("react/jsx-runtime");
4383
4709
  function truncateWallet(addr, chars) {
4384
4710
  if (addr.length <= chars * 2 + 3) return addr;
4385
4711
  return `${addr.slice(0, chars)}...${addr.slice(-chars)}`;
@@ -4399,12 +4725,12 @@ function PlayersCard({
4399
4725
  if (team === "away") return awayColor;
4400
4726
  return drawColor;
4401
4727
  };
4402
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.View, { style: [styles9.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4403
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.Text, { style: [styles9.title, { color: t.text }], children: [
4728
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.View, { style: [styles10.card, { backgroundColor: t.surface, borderColor: t.border }], children: [
4729
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.Text, { style: [styles10.title, { color: t.text }], children: [
4404
4730
  "Players",
4405
4731
  bettors.length > 0 ? ` (${bettors.length})` : ""
4406
4732
  ] }),
4407
- bettors.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.Text, { style: [styles9.empty, { color: t.textMuted }], children: "No players yet \u2014 be the first!" }) : bettors.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4733
+ bettors.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.Text, { style: [styles10.empty, { color: t.textMuted }], children: "No players yet \u2014 be the first!" }) : bettors.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4408
4734
  BettorRow,
4409
4735
  {
4410
4736
  bettor: b,
@@ -4426,20 +4752,20 @@ function BettorRow({
4426
4752
  ImageComponent,
4427
4753
  t
4428
4754
  }) {
4429
- const [imgFailed, setImgFailed] = (0, import_react24.useState)(false);
4755
+ const [imgFailed, setImgFailed] = (0, import_react25.useState)(false);
4430
4756
  const Img = ImageComponent || require("react-native").Image;
4431
4757
  const showAvatar = bettor.avatar && !imgFailed;
4432
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.View, { style: [styles9.row, !isFirst && { borderTopColor: t.border, borderTopWidth: 1 }], children: [
4433
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.View, { style: [styles9.dot, { backgroundColor: dotColor }] }),
4434
- showAvatar ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Img, { source: { uri: ensurePngAvatar(bettor.avatar) }, style: styles9.avatar, resizeMode: "cover", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.View, { style: [styles9.avatar, styles9.avatarPlaceholder] }),
4435
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.View, { style: styles9.nameCol, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native15.Text, { style: [styles9.username, { color: t.text }], numberOfLines: 1, children: bettor.username || truncateWallet(bettor.wallet, truncateChars) }) }),
4436
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native15.Text, { style: [styles9.amount, { color: t.textSecondary }], children: [
4758
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.View, { style: [styles10.row, !isFirst && { borderTopColor: t.border, borderTopWidth: 1 }], children: [
4759
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.View, { style: [styles10.dot, { backgroundColor: dotColor }] }),
4760
+ showAvatar ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Img, { source: { uri: ensurePngAvatar(bettor.avatar) }, style: styles10.avatar, resizeMode: "cover", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.View, { style: [styles10.avatar, styles10.avatarPlaceholder] }),
4761
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.View, { style: styles10.nameCol, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.Text, { style: [styles10.username, { color: t.text }], numberOfLines: 1, children: bettor.username || truncateWallet(bettor.wallet, truncateChars) }) }),
4762
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.Text, { style: [styles10.amount, { color: t.textSecondary }], children: [
4437
4763
  bettor.amount,
4438
4764
  " SOL"
4439
4765
  ] })
4440
4766
  ] });
4441
4767
  }
4442
- var styles9 = import_react_native15.StyleSheet.create({
4768
+ var styles10 = import_react_native16.StyleSheet.create({
4443
4769
  card: { borderRadius: 16, borderWidth: 1, padding: 16 },
4444
4770
  title: { fontSize: 17, fontWeight: "700", marginBottom: 12 },
4445
4771
  empty: { fontSize: 14, textAlign: "center", paddingVertical: 16 },
@@ -4453,9 +4779,9 @@ var styles9 = import_react_native15.StyleSheet.create({
4453
4779
  });
4454
4780
 
4455
4781
  // src/ui/game/JoinGameButton.tsx
4456
- var import_react25 = require("react");
4457
- var import_react_native16 = require("react-native");
4458
- var import_jsx_runtime13 = require("react/jsx-runtime");
4782
+ var import_react26 = require("react");
4783
+ var import_react_native17 = require("react-native");
4784
+ var import_jsx_runtime14 = require("react/jsx-runtime");
4459
4785
  var STATUS_LABELS = {
4460
4786
  building: "Building transaction...",
4461
4787
  signing: "Approve in wallet...",
@@ -4464,37 +4790,37 @@ var STATUS_LABELS = {
4464
4790
  };
4465
4791
  function JoinGameButton({ game, walletAddress, selectedTeam, status, onJoin }) {
4466
4792
  const t = useDubsTheme();
4467
- const alreadyJoined = (0, import_react25.useMemo)(() => {
4793
+ const alreadyJoined = (0, import_react26.useMemo)(() => {
4468
4794
  if (!walletAddress) return false;
4469
4795
  return (game.bettors || []).some((b) => b.wallet === walletAddress);
4470
4796
  }, [game.bettors, walletAddress]);
4471
4797
  if (alreadyJoined || game.isLocked || game.isResolved) return null;
4472
4798
  const isJoining = status !== "idle" && status !== "success" && status !== "error";
4473
4799
  const statusLabel = STATUS_LABELS[status] || "";
4474
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.View, { style: [styles10.bar, { backgroundColor: t.background, borderTopColor: t.border }], children: [
4475
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.View, { style: styles10.buyInRow, children: [
4476
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.Text, { style: [styles10.buyInLabel, { color: t.textMuted }], children: "Buy-in" }),
4477
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.Text, { style: [styles10.buyInValue, { color: t.text }], children: [
4800
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: [styles11.bar, { backgroundColor: t.background, borderTopColor: t.border }], children: [
4801
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.buyInRow, children: [
4802
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.buyInLabel, { color: t.textMuted }], children: "Buy-in" }),
4803
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.Text, { style: [styles11.buyInValue, { color: t.text }], children: [
4478
4804
  game.buyIn,
4479
4805
  " SOL"
4480
4806
  ] })
4481
4807
  ] }),
4482
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4483
- import_react_native16.TouchableOpacity,
4808
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4809
+ import_react_native17.TouchableOpacity,
4484
4810
  {
4485
- style: [styles10.button, { backgroundColor: selectedTeam ? t.accent : t.border }],
4811
+ style: [styles11.button, { backgroundColor: selectedTeam ? t.accent : t.border }],
4486
4812
  disabled: !selectedTeam || isJoining,
4487
4813
  onPress: onJoin,
4488
4814
  activeOpacity: 0.8,
4489
- children: isJoining ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native16.View, { style: styles10.joiningRow, children: [
4490
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.ActivityIndicator, { size: "small", color: "#000" }),
4491
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.Text, { style: styles10.buttonText, children: statusLabel })
4492
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native16.Text, { style: [styles10.buttonText, !selectedTeam && { color: t.textMuted }], children: selectedTeam ? `Join Bet \u2014 ${game.buyIn} SOL` : "Pick a team to bet" })
4815
+ children: isJoining ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.joiningRow, children: [
4816
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.ActivityIndicator, { size: "small", color: "#000" }),
4817
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: styles11.buttonText, children: statusLabel })
4818
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.buttonText, !selectedTeam && { color: t.textMuted }], children: selectedTeam ? `Join Bet \u2014 ${game.buyIn} SOL` : "Pick a team to bet" })
4493
4819
  }
4494
4820
  )
4495
4821
  ] });
4496
4822
  }
4497
- var styles10 = import_react_native16.StyleSheet.create({
4823
+ var styles11 = import_react_native17.StyleSheet.create({
4498
4824
  bar: { position: "absolute", bottom: 0, left: 0, right: 0, paddingHorizontal: 16, paddingTop: 12, paddingBottom: 36, borderTopWidth: 1 },
4499
4825
  buyInRow: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", marginBottom: 10 },
4500
4826
  buyInLabel: { fontSize: 13 },
@@ -4505,9 +4831,9 @@ var styles10 = import_react_native16.StyleSheet.create({
4505
4831
  });
4506
4832
 
4507
4833
  // src/ui/game/CreateCustomGameSheet.tsx
4508
- var import_react26 = require("react");
4509
- var import_react_native17 = require("react-native");
4510
- var import_jsx_runtime14 = require("react/jsx-runtime");
4834
+ var import_react27 = require("react");
4835
+ var import_react_native18 = require("react-native");
4836
+ var import_jsx_runtime15 = require("react/jsx-runtime");
4511
4837
  var STATUS_LABELS2 = {
4512
4838
  building: "Building transaction...",
4513
4839
  signing: "Approve in wallet...",
@@ -4531,18 +4857,18 @@ function CreateCustomGameSheet({
4531
4857
  const t = useDubsTheme();
4532
4858
  const { wallet } = useDubs();
4533
4859
  const mutation = useCreateCustomGame();
4534
- const [selectedAmount, setSelectedAmount] = (0, import_react26.useState)(null);
4535
- const [customAmount, setCustomAmount] = (0, import_react26.useState)("");
4536
- const [isCustom, setIsCustom] = (0, import_react26.useState)(false);
4537
- const overlayOpacity = (0, import_react26.useRef)(new import_react_native17.Animated.Value(0)).current;
4538
- (0, import_react26.useEffect)(() => {
4539
- import_react_native17.Animated.timing(overlayOpacity, {
4860
+ const [selectedAmount, setSelectedAmount] = (0, import_react27.useState)(null);
4861
+ const [customAmount, setCustomAmount] = (0, import_react27.useState)("");
4862
+ const [isCustom, setIsCustom] = (0, import_react27.useState)(false);
4863
+ const overlayOpacity = (0, import_react27.useRef)(new import_react_native18.Animated.Value(0)).current;
4864
+ (0, import_react27.useEffect)(() => {
4865
+ import_react_native18.Animated.timing(overlayOpacity, {
4540
4866
  toValue: visible ? 1 : 0,
4541
4867
  duration: 250,
4542
4868
  useNativeDriver: true
4543
4869
  }).start();
4544
4870
  }, [visible, overlayOpacity]);
4545
- (0, import_react26.useEffect)(() => {
4871
+ (0, import_react27.useEffect)(() => {
4546
4872
  if (visible) {
4547
4873
  setSelectedAmount(defaultAmount ?? null);
4548
4874
  setCustomAmount("");
@@ -4550,7 +4876,7 @@ function CreateCustomGameSheet({
4550
4876
  mutation.reset();
4551
4877
  }
4552
4878
  }, [visible]);
4553
- (0, import_react26.useEffect)(() => {
4879
+ (0, import_react27.useEffect)(() => {
4554
4880
  if (mutation.status === "success" && mutation.data) {
4555
4881
  onSuccess?.(mutation.data);
4556
4882
  const timer = setTimeout(() => {
@@ -4559,23 +4885,23 @@ function CreateCustomGameSheet({
4559
4885
  return () => clearTimeout(timer);
4560
4886
  }
4561
4887
  }, [mutation.status, mutation.data]);
4562
- (0, import_react26.useEffect)(() => {
4888
+ (0, import_react27.useEffect)(() => {
4563
4889
  if (mutation.status === "error" && mutation.error) {
4564
4890
  onError?.(mutation.error);
4565
4891
  }
4566
4892
  }, [mutation.status, mutation.error]);
4567
- const handlePresetSelect = (0, import_react26.useCallback)((amount) => {
4893
+ const handlePresetSelect = (0, import_react27.useCallback)((amount) => {
4568
4894
  setSelectedAmount(amount);
4569
4895
  setIsCustom(false);
4570
4896
  setCustomAmount("");
4571
4897
  onAmountChange?.(amount);
4572
4898
  }, [onAmountChange]);
4573
- const handleCustomSelect = (0, import_react26.useCallback)(() => {
4899
+ const handleCustomSelect = (0, import_react27.useCallback)(() => {
4574
4900
  setIsCustom(true);
4575
4901
  setSelectedAmount(null);
4576
4902
  onAmountChange?.(null);
4577
4903
  }, [onAmountChange]);
4578
- const handleCustomAmountChange = (0, import_react26.useCallback)((text) => {
4904
+ const handleCustomAmountChange = (0, import_react27.useCallback)((text) => {
4579
4905
  const cleaned = text.replace(/[^0-9.]/g, "").replace(/(\..*?)\..*/g, "$1");
4580
4906
  setCustomAmount(cleaned);
4581
4907
  const parsed = parseFloat(cleaned);
@@ -4590,7 +4916,7 @@ function CreateCustomGameSheet({
4590
4916
  const winnerTakes = pot * (1 - fee / 100);
4591
4917
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
4592
4918
  const canCreate = finalAmount !== null && finalAmount > 0 && !isMutating && mutation.status !== "success";
4593
- const handleCreate = (0, import_react26.useCallback)(async () => {
4919
+ const handleCreate = (0, import_react27.useCallback)(async () => {
4594
4920
  if (!finalAmount || !wallet.publicKey) return;
4595
4921
  try {
4596
4922
  await mutation.execute({
@@ -4606,42 +4932,42 @@ function CreateCustomGameSheet({
4606
4932
  }, [finalAmount, wallet.publicKey, mutation.execute, title, maxPlayers, metadata]);
4607
4933
  const statusLabel = STATUS_LABELS2[mutation.status] || "";
4608
4934
  const playersLabel = playerCount === 2 ? "2 (1v1)" : `${playerCount} players`;
4609
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
4610
- import_react_native17.Modal,
4935
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
4936
+ import_react_native18.Modal,
4611
4937
  {
4612
4938
  visible,
4613
4939
  animationType: "slide",
4614
4940
  transparent: true,
4615
4941
  onRequestClose: onDismiss,
4616
4942
  children: [
4617
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Animated.View, { style: [styles11.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.TouchableOpacity, { style: styles11.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
4618
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4619
- import_react_native17.KeyboardAvoidingView,
4943
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Animated.View, { style: [styles12.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.TouchableOpacity, { style: styles12.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
4944
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4945
+ import_react_native18.KeyboardAvoidingView,
4620
4946
  {
4621
- style: styles11.keyboardView,
4622
- behavior: import_react_native17.Platform.OS === "ios" ? "padding" : void 0,
4623
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.View, { style: styles11.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: [styles11.sheet, { backgroundColor: t.background }], children: [
4624
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.View, { style: styles11.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.View, { style: [styles11.handle, { backgroundColor: t.textMuted }] }) }),
4625
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.header, children: [
4626
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Create Pool" : "New Game" }),
4627
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.closeButton, { color: t.textMuted }], children: "\u2715" }) })
4947
+ style: styles12.keyboardView,
4948
+ behavior: import_react_native18.Platform.OS === "ios" ? "padding" : void 0,
4949
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: styles12.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: [styles12.sheet, { backgroundColor: t.background }], children: [
4950
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: styles12.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.handle, { backgroundColor: t.textMuted }] }) }),
4951
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.header, children: [
4952
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Create Pool" : "New Game" }),
4953
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.closeButton, { color: t.textMuted }], children: "\u2715" }) })
4628
4954
  ] }),
4629
- !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.section, children: [
4630
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.sectionLabel, { color: t.textSecondary }], children: "Buy-In Amount" }),
4631
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.chipsRow, children: [
4955
+ !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.section, children: [
4956
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.sectionLabel, { color: t.textSecondary }], children: "Buy-In Amount" }),
4957
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.chipsRow, children: [
4632
4958
  presetAmounts.map((amount) => {
4633
4959
  const active = !isCustom && selectedAmount === amount;
4634
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4635
- import_react_native17.TouchableOpacity,
4960
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4961
+ import_react_native18.TouchableOpacity,
4636
4962
  {
4637
4963
  style: [
4638
- styles11.chip,
4964
+ styles12.chip,
4639
4965
  { borderColor: active ? t.accent : t.border },
4640
4966
  active && { backgroundColor: t.accent }
4641
4967
  ],
4642
4968
  onPress: () => handlePresetSelect(amount),
4643
4969
  activeOpacity: 0.8,
4644
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.Text, { style: [styles11.chipText, { color: active ? "#FFFFFF" : t.text }], children: [
4970
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.chipText, { color: active ? "#FFFFFF" : t.text }], children: [
4645
4971
  amount,
4646
4972
  " SOL"
4647
4973
  ] })
@@ -4649,24 +4975,24 @@ function CreateCustomGameSheet({
4649
4975
  amount
4650
4976
  );
4651
4977
  }),
4652
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4653
- import_react_native17.TouchableOpacity,
4978
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4979
+ import_react_native18.TouchableOpacity,
4654
4980
  {
4655
4981
  style: [
4656
- styles11.chip,
4982
+ styles12.chip,
4657
4983
  { borderColor: isCustom ? t.accent : t.border },
4658
4984
  isCustom && { backgroundColor: t.accent }
4659
4985
  ],
4660
4986
  onPress: handleCustomSelect,
4661
4987
  activeOpacity: 0.8,
4662
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.chipText, { color: isCustom ? "#FFFFFF" : t.text }], children: "Custom" })
4988
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.chipText, { color: isCustom ? "#FFFFFF" : t.text }], children: "Custom" })
4663
4989
  }
4664
4990
  )
4665
4991
  ] }),
4666
- isCustom && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4667
- import_react_native17.TextInput,
4992
+ isCustom && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4993
+ import_react_native18.TextInput,
4668
4994
  {
4669
- style: [styles11.input, { backgroundColor: t.surface, color: t.text, borderColor: t.accent }],
4995
+ style: [styles12.input, { backgroundColor: t.surface, color: t.text, borderColor: t.accent }],
4670
4996
  placeholder: "Enter amount in SOL",
4671
4997
  placeholderTextColor: t.textDim,
4672
4998
  keyboardType: "decimal-pad",
@@ -4676,43 +5002,43 @@ function CreateCustomGameSheet({
4676
5002
  }
4677
5003
  )
4678
5004
  ] }),
4679
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: [styles11.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
4680
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.summaryRow, children: [
4681
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
4682
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.summaryValue, { color: t.text }], children: finalAmount ? `${finalAmount} SOL` : "\u2014" })
5005
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: [styles12.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5006
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5007
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5008
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.text }], children: finalAmount ? `${finalAmount} SOL` : "\u2014" })
4683
5009
  ] }),
4684
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.View, { style: [styles11.summarySep, { backgroundColor: t.border }] }),
4685
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.summaryRow, children: [
4686
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.summaryLabel, { color: t.textMuted }], children: isPoolModeEnabled ? "Max players" : "Players" }),
4687
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.summaryValue, { color: t.text }], children: isPoolModeEnabled ? playerCount : playersLabel })
5010
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5011
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5012
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: isPoolModeEnabled ? "Max players" : "Players" }),
5013
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.text }], children: isPoolModeEnabled ? playerCount : playersLabel })
4688
5014
  ] }),
4689
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.View, { style: [styles11.summarySep, { backgroundColor: t.border }] }),
4690
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.summaryRow, children: [
4691
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.summaryLabel, { color: t.textMuted }], children: isPoolModeEnabled ? "Max pot" : "Winner Takes" }),
4692
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.winnerCol, children: [
4693
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.summaryValue, { color: t.success }], children: finalAmount ? `${(finalAmount * playerCount * (1 - fee / 100)).toFixed(4)} SOL` : "\u2014" }),
4694
- finalAmount ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.Text, { style: [styles11.feeNote, { color: t.textDim }], children: [
5015
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5016
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5017
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: isPoolModeEnabled ? "Max pot" : "Winner Takes" }),
5018
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.winnerCol, children: [
5019
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.success }], children: finalAmount ? `${(finalAmount * playerCount * (1 - fee / 100)).toFixed(4)} SOL` : "\u2014" }),
5020
+ finalAmount ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.feeNote, { color: t.textDim }], children: [
4695
5021
  fee,
4696
5022
  "% platform fee"
4697
5023
  ] }) : null
4698
5024
  ] })
4699
5025
  ] })
4700
5026
  ] }),
4701
- mutation.error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.View, { style: [styles11.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.errorText, { color: t.errorText }], children: mutation.error.message }) }),
4702
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4703
- import_react_native17.TouchableOpacity,
5027
+ mutation.error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5028
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5029
+ import_react_native18.TouchableOpacity,
4704
5030
  {
4705
5031
  style: [
4706
- styles11.ctaButton,
5032
+ styles12.ctaButton,
4707
5033
  { backgroundColor: canCreate ? t.accent : t.border }
4708
5034
  ],
4709
5035
  disabled: !canCreate,
4710
5036
  onPress: handleCreate,
4711
5037
  activeOpacity: 0.8,
4712
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native17.View, { style: styles11.ctaLoading, children: [
4713
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
4714
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: styles11.ctaText, children: statusLabel })
4715
- ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: styles11.ctaText, children: isPoolModeEnabled ? "Pool Created!" : STATUS_LABELS2.success }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native17.Text, { style: [styles11.ctaText, !canCreate && { opacity: 0.5 }], children: isPoolModeEnabled ? `Create Pool \u2014 ${finalAmount} SOL` : effectiveAmount ? `Create Game \u2014 ${effectiveAmount} SOL` : "Select buy-in amount" })
5038
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.ctaLoading, children: [
5039
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5040
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: styles12.ctaText, children: statusLabel })
5041
+ ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: styles12.ctaText, children: isPoolModeEnabled ? "Pool Created!" : STATUS_LABELS2.success }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.ctaText, !canCreate && { opacity: 0.5 }], children: isPoolModeEnabled ? `Create Pool \u2014 ${finalAmount} SOL` : effectiveAmount ? `Create Game \u2014 ${effectiveAmount} SOL` : "Select buy-in amount" })
4716
5042
  }
4717
5043
  )
4718
5044
  ] }) })
@@ -4722,9 +5048,9 @@ function CreateCustomGameSheet({
4722
5048
  }
4723
5049
  );
4724
5050
  }
4725
- var styles11 = import_react_native17.StyleSheet.create({
5051
+ var styles12 = import_react_native18.StyleSheet.create({
4726
5052
  overlay: {
4727
- ...import_react_native17.StyleSheet.absoluteFillObject,
5053
+ ...import_react_native18.StyleSheet.absoluteFillObject,
4728
5054
  backgroundColor: "rgba(0,0,0,0.5)"
4729
5055
  },
4730
5056
  overlayTap: {
@@ -4859,9 +5185,9 @@ var styles11 = import_react_native17.StyleSheet.create({
4859
5185
  });
4860
5186
 
4861
5187
  // src/ui/game/JoinGameSheet.tsx
4862
- var import_react27 = require("react");
4863
- var import_react_native18 = require("react-native");
4864
- var import_jsx_runtime15 = require("react/jsx-runtime");
5188
+ var import_react28 = require("react");
5189
+ var import_react_native19 = require("react-native");
5190
+ var import_jsx_runtime16 = require("react/jsx-runtime");
4865
5191
  var STATUS_LABELS3 = {
4866
5192
  building: "Building transaction...",
4867
5193
  signing: "Approve in wallet...",
@@ -4885,22 +5211,22 @@ function JoinGameSheet({
4885
5211
  const { wallet } = useDubs();
4886
5212
  const mutation = useJoinGame();
4887
5213
  const isCustomGame = game.gameMode === CUSTOM_GAME_MODE;
4888
- const [selectedTeam, setSelectedTeam] = (0, import_react27.useState)(null);
4889
- const overlayOpacity = (0, import_react27.useRef)(new import_react_native18.Animated.Value(0)).current;
4890
- (0, import_react27.useEffect)(() => {
4891
- import_react_native18.Animated.timing(overlayOpacity, {
5214
+ const [selectedTeam, setSelectedTeam] = (0, import_react28.useState)(null);
5215
+ const overlayOpacity = (0, import_react28.useRef)(new import_react_native19.Animated.Value(0)).current;
5216
+ (0, import_react28.useEffect)(() => {
5217
+ import_react_native19.Animated.timing(overlayOpacity, {
4892
5218
  toValue: visible ? 1 : 0,
4893
5219
  duration: 250,
4894
5220
  useNativeDriver: true
4895
5221
  }).start();
4896
5222
  }, [visible, overlayOpacity]);
4897
- (0, import_react27.useEffect)(() => {
5223
+ (0, import_react28.useEffect)(() => {
4898
5224
  if (visible) {
4899
5225
  setSelectedTeam(isPoolModeEnabled ? "home" : isCustomGame ? "away" : null);
4900
5226
  mutation.reset();
4901
5227
  }
4902
5228
  }, [visible]);
4903
- (0, import_react27.useEffect)(() => {
5229
+ (0, import_react28.useEffect)(() => {
4904
5230
  if (mutation.status === "success" && mutation.data) {
4905
5231
  onSuccess?.(mutation.data);
4906
5232
  const timer = setTimeout(() => {
@@ -4909,7 +5235,7 @@ function JoinGameSheet({
4909
5235
  return () => clearTimeout(timer);
4910
5236
  }
4911
5237
  }, [mutation.status, mutation.data]);
4912
- (0, import_react27.useEffect)(() => {
5238
+ (0, import_react28.useEffect)(() => {
4913
5239
  if (mutation.status === "error" && mutation.error) {
4914
5240
  onError?.(mutation.error);
4915
5241
  }
@@ -4920,7 +5246,7 @@ function JoinGameSheet({
4920
5246
  const homePool = game.homePool || 0;
4921
5247
  const awayPool = game.awayPool || 0;
4922
5248
  const buyIn = game.buyIn;
4923
- const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react27.useMemo)(() => ({
5249
+ const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react28.useMemo)(() => ({
4924
5250
  homeOdds: homePool > 0 ? (totalPool / homePool).toFixed(2) : "\u2014",
4925
5251
  awayOdds: awayPool > 0 ? (totalPool / awayPool).toFixed(2) : "\u2014",
4926
5252
  homeBets: bettors.filter((b) => b.team === "home").length,
@@ -4932,14 +5258,14 @@ function JoinGameSheet({
4932
5258
  const homeName = shortName ? shortName(opponents[0]?.name) : opponents[0]?.name || "Home";
4933
5259
  const awayName = shortName ? shortName(opponents[1]?.name) : opponents[1]?.name || "Away";
4934
5260
  const selectedName = selectedTeam === "home" ? homeName : selectedTeam === "away" ? awayName : "\u2014";
4935
- const alreadyJoined = (0, import_react27.useMemo)(() => {
5261
+ const alreadyJoined = (0, import_react28.useMemo)(() => {
4936
5262
  if (!wallet.publicKey) return false;
4937
5263
  const addr = wallet.publicKey.toBase58();
4938
5264
  return bettors.some((b) => b.wallet === addr);
4939
5265
  }, [bettors, wallet.publicKey]);
4940
5266
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
4941
5267
  const canJoin = selectedTeam !== null && !isMutating && mutation.status !== "success" && !alreadyJoined;
4942
- const handleJoin = (0, import_react27.useCallback)(async () => {
5268
+ const handleJoin = (0, import_react28.useCallback)(async () => {
4943
5269
  if (!selectedTeam || !wallet.publicKey) return;
4944
5270
  try {
4945
5271
  await mutation.execute({
@@ -4952,30 +5278,30 @@ function JoinGameSheet({
4952
5278
  }
4953
5279
  }, [selectedTeam, wallet.publicKey, mutation.execute, game.gameId, buyIn]);
4954
5280
  const statusLabel = STATUS_LABELS3[mutation.status] || "";
4955
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
4956
- import_react_native18.Modal,
5281
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5282
+ import_react_native19.Modal,
4957
5283
  {
4958
5284
  visible,
4959
5285
  animationType: "slide",
4960
5286
  transparent: true,
4961
5287
  onRequestClose: onDismiss,
4962
5288
  children: [
4963
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Animated.View, { style: [styles12.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.TouchableOpacity, { style: styles12.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
4964
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4965
- import_react_native18.KeyboardAvoidingView,
5289
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Animated.View, { style: [styles13.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.TouchableOpacity, { style: styles13.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
5290
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5291
+ import_react_native19.KeyboardAvoidingView,
4966
5292
  {
4967
- style: styles12.keyboardView,
4968
- behavior: import_react_native18.Platform.OS === "ios" ? "padding" : void 0,
4969
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: styles12.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: [styles12.sheet, { backgroundColor: t.background }], children: [
4970
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: styles12.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.handle, { backgroundColor: t.textMuted }] }) }),
4971
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.header, children: [
4972
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
4973
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5293
+ style: styles13.keyboardView,
5294
+ behavior: import_react_native19.Platform.OS === "ios" ? "padding" : void 0,
5295
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.sheet, { backgroundColor: t.background }], children: [
5296
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.handle, { backgroundColor: t.textMuted }] }) }),
5297
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.header, children: [
5298
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
5299
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.closeButton, { color: t.textMuted }], children: "\u2715" }) })
4974
5300
  ] }),
4975
- !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.section, children: [
4976
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
4977
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.teamsRow, children: [
4978
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5301
+ !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.section, children: [
5302
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5303
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.teamsRow, children: [
5304
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4979
5305
  TeamButton,
4980
5306
  {
4981
5307
  name: homeName,
@@ -4989,7 +5315,7 @@ function JoinGameSheet({
4989
5315
  t
4990
5316
  }
4991
5317
  ),
4992
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5318
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4993
5319
  TeamButton,
4994
5320
  {
4995
5321
  name: awayName,
@@ -5005,64 +5331,64 @@ function JoinGameSheet({
5005
5331
  )
5006
5332
  ] })
5007
5333
  ] }),
5008
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: [styles12.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5009
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5010
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5011
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.text }], children: [
5334
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5335
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5336
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5337
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: [
5012
5338
  buyIn,
5013
5339
  " SOL"
5014
5340
  ] })
5015
5341
  ] }),
5016
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5017
- isPoolModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
5018
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5019
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5020
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.text }], children: bettors.length })
5342
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5343
+ isPoolModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5344
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5345
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5346
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: bettors.length })
5021
5347
  ] }),
5022
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5023
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5024
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5025
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.success }], children: [
5348
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5349
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5350
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5351
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: [
5026
5352
  totalPool,
5027
5353
  " SOL"
5028
5354
  ] })
5029
5355
  ] })
5030
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
5031
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5032
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Your side" }),
5033
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.text }], children: selectedName })
5356
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5357
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5358
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Your side" }),
5359
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: selectedName })
5034
5360
  ] }),
5035
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5036
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5037
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5038
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.text }], children: [
5361
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5362
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5363
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5364
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: [
5039
5365
  poolAfterJoin,
5040
5366
  " SOL"
5041
5367
  ] })
5042
5368
  ] }),
5043
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.summarySep, { backgroundColor: t.border }] }),
5044
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.summaryRow, children: [
5045
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5046
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5369
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5370
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5371
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5372
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5047
5373
  ] })
5048
5374
  ] })
5049
5375
  ] }),
5050
- alreadyJoined && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.errorBox, { backgroundColor: t.surface, borderColor: t.border }], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.errorText, { color: t.textMuted }], children: isPoolModeEnabled ? "You've already joined this pool." : "You've already joined this game." }) }),
5051
- mutation.error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5052
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5053
- import_react_native18.TouchableOpacity,
5376
+ alreadyJoined && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.errorBox, { backgroundColor: t.surface, borderColor: t.border }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.errorText, { color: t.textMuted }], children: isPoolModeEnabled ? "You've already joined this pool." : "You've already joined this game." }) }),
5377
+ mutation.error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5378
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5379
+ import_react_native19.TouchableOpacity,
5054
5380
  {
5055
5381
  style: [
5056
- styles12.ctaButton,
5382
+ styles13.ctaButton,
5057
5383
  { backgroundColor: canJoin ? t.accent : t.border }
5058
5384
  ],
5059
5385
  disabled: !canJoin,
5060
5386
  onPress: handleJoin,
5061
5387
  activeOpacity: 0.8,
5062
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.View, { style: styles12.ctaLoading, children: [
5063
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5064
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: styles12.ctaText, children: statusLabel })
5065
- ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: styles12.ctaText, children: isPoolModeEnabled ? "Joined!" : STATUS_LABELS3.success }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.ctaText, !canJoin && { opacity: 0.5 }], children: alreadyJoined ? "Already Joined" : isPoolModeEnabled ? `Join Pool \u2014 ${buyIn} SOL` : selectedTeam ? `Join Game \u2014 ${buyIn} SOL` : "Pick a side to join" })
5388
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.ctaLoading, children: [
5389
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5390
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.ctaText, children: statusLabel })
5391
+ ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.ctaText, children: isPoolModeEnabled ? "Joined!" : STATUS_LABELS3.success }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.ctaText, !canJoin && { opacity: 0.5 }], children: alreadyJoined ? "Already Joined" : isPoolModeEnabled ? `Join Pool \u2014 ${buyIn} SOL` : selectedTeam ? `Join Game \u2014 ${buyIn} SOL` : "Pick a side to join" })
5066
5392
  }
5067
5393
  )
5068
5394
  ] }) })
@@ -5083,35 +5409,35 @@ function TeamButton({
5083
5409
  ImageComponent,
5084
5410
  t
5085
5411
  }) {
5086
- const [imgFailed, setImgFailed] = (0, import_react27.useState)(false);
5412
+ const [imgFailed, setImgFailed] = (0, import_react28.useState)(false);
5087
5413
  const Img = ImageComponent || require("react-native").Image;
5088
5414
  const showImage = imageUrl && !imgFailed;
5089
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
5090
- import_react_native18.TouchableOpacity,
5415
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5416
+ import_react_native19.TouchableOpacity,
5091
5417
  {
5092
- style: [styles12.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
5418
+ style: [styles13.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
5093
5419
  onPress,
5094
5420
  activeOpacity: 0.7,
5095
5421
  children: [
5096
- showImage ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Img, { source: { uri: imageUrl }, style: styles12.teamLogo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.teamLogo, styles12.teamLogoPlaceholder] }),
5097
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: [styles12.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5098
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.teamOdds, { color }], children: [
5422
+ showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Img, { source: { uri: imageUrl }, style: styles13.teamLogo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.teamLogo, styles13.teamLogoPlaceholder] }),
5423
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5424
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.teamOdds, { color }], children: [
5099
5425
  odds,
5100
5426
  "x"
5101
5427
  ] }),
5102
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native18.Text, { style: [styles12.teamBets, { color: t.textMuted }], children: [
5428
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.teamBets, { color: t.textMuted }], children: [
5103
5429
  bets,
5104
5430
  " ",
5105
5431
  bets === 1 ? "bet" : "bets"
5106
5432
  ] }),
5107
- selected && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.View, { style: [styles12.teamBadge, { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native18.Text, { style: styles12.teamBadgeText, children: "Selected" }) })
5433
+ selected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.teamBadge, { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.teamBadgeText, children: "Selected" }) })
5108
5434
  ]
5109
5435
  }
5110
5436
  );
5111
5437
  }
5112
- var styles12 = import_react_native18.StyleSheet.create({
5438
+ var styles13 = import_react_native19.StyleSheet.create({
5113
5439
  overlay: {
5114
- ...import_react_native18.StyleSheet.absoluteFillObject,
5440
+ ...import_react_native19.StyleSheet.absoluteFillObject,
5115
5441
  backgroundColor: "rgba(0,0,0,0.5)"
5116
5442
  },
5117
5443
  overlayTap: {
@@ -5260,9 +5586,9 @@ var styles12 = import_react_native18.StyleSheet.create({
5260
5586
  });
5261
5587
 
5262
5588
  // src/ui/game/ClaimPrizeSheet.tsx
5263
- var import_react28 = require("react");
5264
- var import_react_native19 = require("react-native");
5265
- var import_jsx_runtime16 = require("react/jsx-runtime");
5589
+ var import_react29 = require("react");
5590
+ var import_react_native20 = require("react-native");
5591
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5266
5592
  var STATUS_LABELS4 = {
5267
5593
  building: "Building transaction...",
5268
5594
  signing: "Approve in wallet...",
@@ -5281,18 +5607,18 @@ function ClaimPrizeSheet({
5281
5607
  const t = useDubsTheme();
5282
5608
  const { wallet } = useDubs();
5283
5609
  const mutation = useClaim();
5284
- const overlayOpacity = (0, import_react28.useRef)(new import_react_native19.Animated.Value(0)).current;
5285
- const celebrationScale = (0, import_react28.useRef)(new import_react_native19.Animated.Value(0)).current;
5286
- const celebrationOpacity = (0, import_react28.useRef)(new import_react_native19.Animated.Value(0)).current;
5287
- const [showCelebration, setShowCelebration] = (0, import_react28.useState)(false);
5288
- (0, import_react28.useEffect)(() => {
5289
- import_react_native19.Animated.timing(overlayOpacity, {
5610
+ const overlayOpacity = (0, import_react29.useRef)(new import_react_native20.Animated.Value(0)).current;
5611
+ const celebrationScale = (0, import_react29.useRef)(new import_react_native20.Animated.Value(0)).current;
5612
+ const celebrationOpacity = (0, import_react29.useRef)(new import_react_native20.Animated.Value(0)).current;
5613
+ const [showCelebration, setShowCelebration] = (0, import_react29.useState)(false);
5614
+ (0, import_react29.useEffect)(() => {
5615
+ import_react_native20.Animated.timing(overlayOpacity, {
5290
5616
  toValue: visible ? 1 : 0,
5291
5617
  duration: 250,
5292
5618
  useNativeDriver: true
5293
5619
  }).start();
5294
5620
  }, [visible, overlayOpacity]);
5295
- (0, import_react28.useEffect)(() => {
5621
+ (0, import_react29.useEffect)(() => {
5296
5622
  if (visible) {
5297
5623
  mutation.reset();
5298
5624
  setShowCelebration(false);
@@ -5300,17 +5626,17 @@ function ClaimPrizeSheet({
5300
5626
  celebrationOpacity.setValue(0);
5301
5627
  }
5302
5628
  }, [visible]);
5303
- (0, import_react28.useEffect)(() => {
5629
+ (0, import_react29.useEffect)(() => {
5304
5630
  if (mutation.status === "success" && mutation.data) {
5305
5631
  setShowCelebration(true);
5306
- import_react_native19.Animated.parallel([
5307
- import_react_native19.Animated.spring(celebrationScale, {
5632
+ import_react_native20.Animated.parallel([
5633
+ import_react_native20.Animated.spring(celebrationScale, {
5308
5634
  toValue: 1,
5309
5635
  tension: 50,
5310
5636
  friction: 6,
5311
5637
  useNativeDriver: true
5312
5638
  }),
5313
- import_react_native19.Animated.timing(celebrationOpacity, {
5639
+ import_react_native20.Animated.timing(celebrationOpacity, {
5314
5640
  toValue: 1,
5315
5641
  duration: 300,
5316
5642
  useNativeDriver: true
@@ -5323,14 +5649,14 @@ function ClaimPrizeSheet({
5323
5649
  return () => clearTimeout(timer);
5324
5650
  }
5325
5651
  }, [mutation.status, mutation.data]);
5326
- (0, import_react28.useEffect)(() => {
5652
+ (0, import_react29.useEffect)(() => {
5327
5653
  if (mutation.status === "error" && mutation.error) {
5328
5654
  onError?.(mutation.error);
5329
5655
  }
5330
5656
  }, [mutation.status, mutation.error]);
5331
5657
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
5332
5658
  const canClaim = !isMutating && mutation.status !== "success" && !!wallet.publicKey;
5333
- const handleClaim = (0, import_react28.useCallback)(async () => {
5659
+ const handleClaim = (0, import_react29.useCallback)(async () => {
5334
5660
  if (!wallet.publicKey) return;
5335
5661
  try {
5336
5662
  await mutation.execute({
@@ -5342,62 +5668,62 @@ function ClaimPrizeSheet({
5342
5668
  }
5343
5669
  }, [wallet.publicKey, mutation.execute, gameId, prizeAmount]);
5344
5670
  const statusLabel = STATUS_LABELS4[mutation.status] || "";
5345
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5346
- import_react_native19.Modal,
5671
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5672
+ import_react_native20.Modal,
5347
5673
  {
5348
5674
  visible,
5349
5675
  animationType: "slide",
5350
5676
  transparent: true,
5351
5677
  onRequestClose: onDismiss,
5352
5678
  children: [
5353
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Animated.View, { style: [styles13.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.TouchableOpacity, { style: styles13.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
5354
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5355
- import_react_native19.KeyboardAvoidingView,
5679
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Animated.View, { style: [styles14.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.TouchableOpacity, { style: styles14.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
5680
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5681
+ import_react_native20.KeyboardAvoidingView,
5356
5682
  {
5357
- style: styles13.keyboardView,
5358
- behavior: import_react_native19.Platform.OS === "ios" ? "padding" : void 0,
5359
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.sheet, { backgroundColor: t.background }], children: [
5360
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.handle, { backgroundColor: t.textMuted }] }) }),
5361
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.header, children: [
5362
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.headerTitle, { color: t.text }], children: showCelebration ? isRefund ? "Refund Claimed!" : "Prize Claimed!" : isRefund ? "Claim Refund" : "Claim Prize" }),
5363
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5683
+ style: styles14.keyboardView,
5684
+ behavior: import_react_native20.Platform.OS === "ios" ? "padding" : void 0,
5685
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.sheet, { backgroundColor: t.background }], children: [
5686
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.handle, { backgroundColor: t.textMuted }] }) }),
5687
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.header, children: [
5688
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.headerTitle, { color: t.text }], children: showCelebration ? isRefund ? "Refund Claimed!" : "Prize Claimed!" : isRefund ? "Claim Refund" : "Claim Prize" }),
5689
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5364
5690
  ] }),
5365
- showCelebration && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5366
- import_react_native19.Animated.View,
5691
+ showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5692
+ import_react_native20.Animated.View,
5367
5693
  {
5368
5694
  style: [
5369
- styles13.celebrationContainer,
5695
+ styles14.celebrationContainer,
5370
5696
  {
5371
5697
  opacity: celebrationOpacity,
5372
5698
  transform: [{ scale: celebrationScale }]
5373
5699
  }
5374
5700
  ],
5375
5701
  children: [
5376
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.celebrationEmoji, children: "\u{1F3C6}" }),
5377
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.celebrationText, { color: t.success }], children: [
5702
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.celebrationEmoji, children: "\u{1F3C6}" }),
5703
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.celebrationText, { color: t.success }], children: [
5378
5704
  "+",
5379
5705
  prizeAmount,
5380
5706
  " SOL"
5381
5707
  ] }),
5382
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.celebrationSubtext, { color: t.textMuted }], children: isRefund ? "Refund sent to your wallet" : "Winnings sent to your wallet" })
5708
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.celebrationSubtext, { color: t.textMuted }], children: isRefund ? "Refund sent to your wallet" : "Winnings sent to your wallet" })
5383
5709
  ]
5384
5710
  }
5385
5711
  ),
5386
- !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5387
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5388
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
5389
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: [
5712
+ !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5713
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5714
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
5715
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: [
5390
5716
  prizeAmount,
5391
5717
  " SOL"
5392
5718
  ] })
5393
5719
  ] }),
5394
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5395
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5396
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Game" }),
5397
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5398
- import_react_native19.Text,
5720
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5721
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5722
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Game" }),
5723
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5724
+ import_react_native20.Text,
5399
5725
  {
5400
- style: [styles13.summaryValue, { color: t.text }],
5726
+ style: [styles14.summaryValue, { color: t.text }],
5401
5727
  numberOfLines: 1,
5402
5728
  children: [
5403
5729
  gameId.slice(0, 8),
@@ -5408,21 +5734,21 @@ function ClaimPrizeSheet({
5408
5734
  )
5409
5735
  ] })
5410
5736
  ] }),
5411
- mutation.error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5412
- !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5413
- import_react_native19.TouchableOpacity,
5737
+ mutation.error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5738
+ !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5739
+ import_react_native20.TouchableOpacity,
5414
5740
  {
5415
5741
  style: [
5416
- styles13.ctaButton,
5742
+ styles14.ctaButton,
5417
5743
  { backgroundColor: canClaim ? t.accent : t.border }
5418
5744
  ],
5419
5745
  disabled: !canClaim,
5420
5746
  onPress: handleClaim,
5421
5747
  activeOpacity: 0.8,
5422
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.ctaLoading, children: [
5423
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5424
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.ctaText, children: statusLabel })
5425
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.ctaText, !canClaim && { opacity: 0.5 }], children: [
5748
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.ctaLoading, children: [
5749
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5750
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.ctaText, children: statusLabel })
5751
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.ctaText, !canClaim && { opacity: 0.5 }], children: [
5426
5752
  isRefund ? "Claim Refund" : "Claim Prize",
5427
5753
  " \u2014 ",
5428
5754
  prizeAmount,
@@ -5430,7 +5756,7 @@ function ClaimPrizeSheet({
5430
5756
  ] })
5431
5757
  }
5432
5758
  ),
5433
- mutation.data?.explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.explorerHint, { color: t.textMuted }], children: "View on Solscan" })
5759
+ mutation.data?.explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.explorerHint, { color: t.textMuted }], children: "View on Solscan" })
5434
5760
  ] }) })
5435
5761
  }
5436
5762
  )
@@ -5438,9 +5764,9 @@ function ClaimPrizeSheet({
5438
5764
  }
5439
5765
  );
5440
5766
  }
5441
- var styles13 = import_react_native19.StyleSheet.create({
5767
+ var styles14 = import_react_native20.StyleSheet.create({
5442
5768
  overlay: {
5443
- ...import_react_native19.StyleSheet.absoluteFillObject,
5769
+ ...import_react_native20.StyleSheet.absoluteFillObject,
5444
5770
  backgroundColor: "rgba(0,0,0,0.5)"
5445
5771
  },
5446
5772
  overlayTap: {
@@ -5563,17 +5889,17 @@ var styles13 = import_react_native19.StyleSheet.create({
5563
5889
  });
5564
5890
 
5565
5891
  // src/ui/game/ClaimButton.tsx
5566
- var import_react29 = require("react");
5567
- var import_react_native20 = require("react-native");
5568
- var import_jsx_runtime17 = require("react/jsx-runtime");
5892
+ var import_react30 = require("react");
5893
+ var import_react_native21 = require("react-native");
5894
+ var import_jsx_runtime18 = require("react/jsx-runtime");
5569
5895
  function ClaimButton({ gameId, style, onSuccess, onError }) {
5570
5896
  const t = useDubsTheme();
5571
5897
  const { wallet } = useDubs();
5572
5898
  const game = useGame(gameId);
5573
5899
  const claimStatus = useHasClaimed(gameId);
5574
- const [sheetVisible, setSheetVisible] = (0, import_react29.useState)(false);
5900
+ const [sheetVisible, setSheetVisible] = (0, import_react30.useState)(false);
5575
5901
  const walletAddress = wallet.publicKey?.toBase58() ?? null;
5576
- const myBet = (0, import_react29.useMemo)(() => {
5902
+ const myBet = (0, import_react30.useMemo)(() => {
5577
5903
  if (!walletAddress || !game.data?.bettors) return null;
5578
5904
  return game.data.bettors.find((b) => b.wallet === walletAddress) ?? null;
5579
5905
  }, [walletAddress, game.data?.bettors]);
@@ -5582,7 +5908,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
5582
5908
  const isWinner = isResolved && myBet != null && myBet.team === game.data?.winnerSide;
5583
5909
  const isEligible = myBet != null && isResolved && (isWinner || isRefund);
5584
5910
  const prizeAmount = isRefund ? myBet?.amount ?? 0 : game.data?.totalPool ?? 0;
5585
- const handleSuccess = (0, import_react29.useCallback)(
5911
+ const handleSuccess = (0, import_react30.useCallback)(
5586
5912
  (result) => {
5587
5913
  claimStatus.refetch();
5588
5914
  onSuccess?.(result);
@@ -5595,13 +5921,13 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
5595
5921
  }
5596
5922
  const label = isRefund ? "Refund" : "Prize";
5597
5923
  if (claimStatus.hasClaimed) {
5598
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5599
- import_react_native20.TouchableOpacity,
5924
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5925
+ import_react_native21.TouchableOpacity,
5600
5926
  {
5601
- style: [styles14.badge, { borderColor: t.accent }, style],
5927
+ style: [styles15.badge, { borderColor: t.accent }, style],
5602
5928
  activeOpacity: 1,
5603
5929
  disabled: true,
5604
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.badgeText, { color: t.accent }], children: [
5930
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.badgeText, { color: t.accent }], children: [
5605
5931
  label,
5606
5932
  " Claimed!"
5607
5933
  ] })
@@ -5611,14 +5937,14 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
5611
5937
  if (!isEligible) {
5612
5938
  return null;
5613
5939
  }
5614
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5615
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5616
- import_react_native20.TouchableOpacity,
5940
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
5941
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5942
+ import_react_native21.TouchableOpacity,
5617
5943
  {
5618
- style: [styles14.button, { backgroundColor: t.accent }, style],
5944
+ style: [styles15.button, { backgroundColor: t.accent }, style],
5619
5945
  activeOpacity: 0.8,
5620
5946
  onPress: () => setSheetVisible(true),
5621
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: styles14.buttonText, children: [
5947
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: styles15.buttonText, children: [
5622
5948
  "Claim ",
5623
5949
  label,
5624
5950
  " \u2014 ",
@@ -5627,7 +5953,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
5627
5953
  ] })
5628
5954
  }
5629
5955
  ),
5630
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5956
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5631
5957
  ClaimPrizeSheet,
5632
5958
  {
5633
5959
  visible: sheetVisible,
@@ -5641,7 +5967,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
5641
5967
  )
5642
5968
  ] });
5643
5969
  }
5644
- var styles14 = import_react_native20.StyleSheet.create({
5970
+ var styles15 = import_react_native21.StyleSheet.create({
5645
5971
  button: {
5646
5972
  height: 52,
5647
5973
  borderRadius: 14,
@@ -5676,6 +6002,7 @@ var styles14 = import_react_native20.StyleSheet.create({
5676
6002
  CreateCustomGameSheet,
5677
6003
  DEFAULT_BASE_URL,
5678
6004
  DEFAULT_RPC_URL,
6005
+ DeveloperDashboardSheet,
5679
6006
  DubsApiError,
5680
6007
  DubsClient,
5681
6008
  DubsProvider,