treege 3.0.0-beta.27 → 3.0.0-beta.28

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.
@@ -1,20 +1,20 @@
1
- import { q as ne, r as He, k as $e, t as _e, a as Ye, v as Ge, w as Ue } from "./useRenderNode-B9cpomOv.js";
2
- import { T as Rt, l as Wt, n as Ht, j as Lt, e as Mt, b as qt, f as Vt, c as Nt, d as $t, g as _t, h as Yt, i as Gt, m as Ut, s as Jt, u as Kt } from "./useRenderNode-B9cpomOv.js";
3
- import { j as e } from "./node-gfy3ym4p.js";
4
- import { g as Xt } from "./node-gfy3ym4p.js";
5
- import { StyleSheet as $, View as l, Text as t, TouchableOpacity as h, Modal as ae, TextInput as ge, ActivityIndicator as be, FlatList as Fe, Alert as Je, ScrollView as je, Switch as Ke } from "react-native";
6
- import { useState as A, useCallback as he, useEffect as de, useMemo as ue, useRef as le } from "react";
7
- const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container, children: r }), Xe = $.create({
1
+ import { q as se, r as Ve, k as Ye, t as Ge, a as Ue, v as Je, w as Ke } from "./useRenderNode-BACcrUML.js";
2
+ import { T as Vt, l as Nt, n as $t, j as Et, e as qt, b as _t, f as Yt, c as Gt, d as Ut, g as Jt, h as Kt, i as Qt, m as Xt, s as Zt, u as er } from "./useRenderNode-BACcrUML.js";
3
+ import { j as e, u as q, T as Qe } from "./ThemeContext-BBEqRK_Q.js";
4
+ import { g as rr } from "./ThemeContext-BBEqRK_Q.js";
5
+ import { StyleSheet as _, View as x, Text as t, TouchableOpacity as h, Modal as ae, TextInput as me, ActivityIndicator as he, FlatList as fe, Alert as Xe, ScrollView as be, Switch as Ze } from "react-native";
6
+ import { useState as R, useCallback as ye, useEffect as ge, useMemo as xe, useRef as ie } from "react";
7
+ const et = ({ children: r }) => /* @__PURE__ */ e.jsx(x, { style: tt.container, children: r }), tt = _.create({
8
8
  container: {
9
9
  padding: 16
10
10
  }
11
- }), Ze = ({ children: r, node: o }) => {
12
- const n = ne()(o.data.label);
13
- return /* @__PURE__ */ e.jsxs(l, { style: Ie.container, children: [
14
- n && /* @__PURE__ */ e.jsx(t, { style: Ie.label, children: n }),
15
- /* @__PURE__ */ e.jsx(l, { style: Ie.content, children: r })
11
+ }), rt = ({ children: r, node: s }) => {
12
+ const i = se(), { colors: n } = q(), c = i(s.data.label);
13
+ return /* @__PURE__ */ e.jsxs(x, { style: De.container, children: [
14
+ c && /* @__PURE__ */ e.jsx(t, { style: [De.label, { color: n.text }], children: c }),
15
+ /* @__PURE__ */ e.jsx(x, { style: De.content, children: r })
16
16
  ] });
17
- }, Ie = $.create({
17
+ }, De = _.create({
18
18
  container: {
19
19
  marginBottom: 16
20
20
  },
@@ -22,137 +22,143 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
22
22
  gap: 8
23
23
  },
24
24
  label: {
25
- color: "#111827",
26
25
  fontSize: 16,
27
26
  fontWeight: "600",
28
27
  marginBottom: 12
29
28
  }
30
- }), et = async (r, o) => {
29
+ }), ot = async (r, s) => {
31
30
  if (!r || r.trim().length < 3)
32
31
  return [];
33
32
  try {
34
- const s = await fetch(
33
+ const i = await fetch(
35
34
  `https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(r)}&format=jsonv2&addressdetails=1&limit=5`,
36
35
  {
37
36
  headers: {
38
37
  Accept: "application/json",
39
38
  "User-Agent": "Treege Renderer",
40
- ...o && { "Accept-Language": o }
39
+ ...s && { "Accept-Language": s }
41
40
  }
42
41
  }
43
42
  );
44
- return s.ok ? (await s.json()).map((a) => ({
45
- label: a.display_name,
46
- value: a.display_name
43
+ return i.ok ? (await i.json()).map((c) => ({
44
+ label: c.display_name,
45
+ value: c.display_name
47
46
  })) : [];
48
- } catch (s) {
49
- return console.error("Nominatim fetch error:", s), [];
47
+ } catch (i) {
48
+ return console.error("Nominatim fetch error:", i), [];
50
49
  }
51
- }, tt = async (r, o) => {
50
+ }, nt = async (r, s) => {
52
51
  if (!r || r.trim().length < 3)
53
52
  return [];
54
53
  try {
55
- const s = await fetch(
56
- `https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(r)}&key=${o}`
54
+ const i = await fetch(
55
+ `https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(r)}&key=${s}`
57
56
  );
58
- if (!s.ok)
59
- return console.warn("Google Places API request failed:", s.status), [];
60
- const n = await s.json();
61
- return n.status !== "OK" && n.status !== "ZERO_RESULTS" ? (console.warn("Google Places API status:", n.status), []) : (n.predictions || []).map((a) => ({
62
- label: a.description,
63
- value: a.description
57
+ if (!i.ok)
58
+ return console.warn("Google Places API request failed:", i.status), [];
59
+ const n = await i.json();
60
+ return n.status !== "OK" && n.status !== "ZERO_RESULTS" ? (console.warn("Google Places API status:", n.status), []) : (n.predictions || []).map((c) => ({
61
+ label: c.description,
62
+ value: c.description
64
63
  }));
65
- } catch (s) {
66
- return console.error("Google Places fetch error:", s), [];
64
+ } catch (i) {
65
+ return console.error("Google Places fetch error:", i), [];
67
66
  }
68
- }, rt = ({
67
+ }, st = ({
69
68
  node: r,
70
- value: o,
71
- setValue: s,
69
+ value: s,
70
+ setValue: i,
72
71
  error: n,
73
- label: a,
74
- placeholder: f,
75
- helperText: m,
76
- id: B,
77
- name: y
72
+ label: c,
73
+ placeholder: S,
74
+ helperText: y,
75
+ id: p,
76
+ name: l
78
77
  }) => {
79
- const [S, u] = A(""), [x, i] = A([]), [c, z] = A(!1), [C, g] = A(!1), { language: b, googleApiKey: j } = He(), T = ne(), q = he(
80
- (k) => {
81
- s(k.value), u(""), z(!1), i([]);
78
+ const [g, a] = R(""), [o, d] = R([]), [m, C] = R(!1), [v, w] = R(!1), { language: f, googleApiKey: b } = Ve(), z = se(), { colors: j } = q(), P = ye(
79
+ (D) => {
80
+ i(D.value), a(""), C(!1), d([]);
82
81
  },
83
- [s]
84
- ), R = () => {
85
- z(!1);
82
+ [i]
83
+ ), u = () => {
84
+ C(!1);
86
85
  };
87
- return de(() => {
88
- if (!S || S.trim().length < 3) {
89
- i([]), g(!1);
86
+ return ge(() => {
87
+ if (!g || g.trim().length < 3) {
88
+ d([]), w(!1);
90
89
  return;
91
90
  }
92
- g(!0);
93
- const k = setTimeout(async () => {
94
- const _ = j ? await tt(S, j) : await et(S, b);
95
- i(_), g(!1);
91
+ w(!0);
92
+ const D = setTimeout(async () => {
93
+ const N = b ? await nt(g, b) : await ot(g, f);
94
+ d(N), w(!1);
96
95
  }, 300);
97
96
  return () => {
98
- clearTimeout(k), g(!1);
97
+ clearTimeout(D), w(!1);
99
98
  };
100
- }, [S, b, j]), /* @__PURE__ */ e.jsxs(l, { style: P.container, children: [
101
- /* @__PURE__ */ e.jsxs(t, { style: P.label, children: [
102
- a || r.data.name,
103
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: P.required, children: "*" })
99
+ }, [g, f, b]), /* @__PURE__ */ e.jsxs(x, { style: L.container, children: [
100
+ /* @__PURE__ */ e.jsxs(t, { style: [L.label, { color: j.textSecondary }], children: [
101
+ c || r.data.name,
102
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: j.error }, children: "*" })
104
103
  ] }),
105
- /* @__PURE__ */ e.jsxs(h, { style: [P.trigger, n && P.triggerError], onPress: () => z(!0), activeOpacity: 0.7, children: [
106
- /* @__PURE__ */ e.jsx(t, { style: [P.triggerText, !o && P.triggerPlaceholder], numberOfLines: 1, children: o || f || T("renderer.defaultAddressInput.enterAddress") }),
107
- /* @__PURE__ */ e.jsx(t, { style: P.icon, children: "📍" })
108
- ] }),
109
- /* @__PURE__ */ e.jsx(ae, { visible: c, transparent: !0, animationType: "fade", onRequestClose: R, children: /* @__PURE__ */ e.jsx(h, { style: P.modalOverlay, activeOpacity: 1, onPress: R, children: /* @__PURE__ */ e.jsxs(h, { style: P.modalContent, activeOpacity: 1, onPress: () => {
104
+ /* @__PURE__ */ e.jsxs(
105
+ h,
106
+ {
107
+ style: [L.trigger, { backgroundColor: j.input, borderColor: j.border }, n && { borderColor: j.error }],
108
+ onPress: () => C(!0),
109
+ activeOpacity: 0.7,
110
+ children: [
111
+ /* @__PURE__ */ e.jsx(t, { style: [L.triggerText, { color: j.text }, !s && { color: j.textMuted }], numberOfLines: 1, children: s || S || z("renderer.defaultAddressInput.enterAddress") }),
112
+ /* @__PURE__ */ e.jsx(t, { style: L.icon, children: "📍" })
113
+ ]
114
+ }
115
+ ),
116
+ /* @__PURE__ */ e.jsx(ae, { visible: m, transparent: !0, animationType: "fade", onRequestClose: u, children: /* @__PURE__ */ e.jsx(h, { style: L.modalOverlay, activeOpacity: 1, onPress: u, children: /* @__PURE__ */ e.jsxs(h, { style: [L.modalContent, { backgroundColor: j.card }], activeOpacity: 1, onPress: () => {
110
117
  }, children: [
111
- /* @__PURE__ */ e.jsxs(l, { style: P.modalHeader, children: [
112
- /* @__PURE__ */ e.jsx(t, { style: P.modalTitle, children: a || r.data.name }),
113
- /* @__PURE__ */ e.jsx(h, { onPress: R, children: /* @__PURE__ */ e.jsx(t, { style: P.closeButton, children: "✕" }) })
118
+ /* @__PURE__ */ e.jsxs(x, { style: [L.modalHeader, { borderBottomColor: j.separator }], children: [
119
+ /* @__PURE__ */ e.jsx(t, { style: [L.modalTitle, { color: j.text }], children: c || r.data.name }),
120
+ /* @__PURE__ */ e.jsx(h, { onPress: u, children: /* @__PURE__ */ e.jsx(t, { style: [L.closeButton, { color: j.textMuted }], children: "✕" }) })
114
121
  ] }),
115
- /* @__PURE__ */ e.jsxs(l, { style: P.searchContainer, children: [
122
+ /* @__PURE__ */ e.jsxs(x, { style: L.searchContainer, children: [
116
123
  /* @__PURE__ */ e.jsx(
117
- ge,
124
+ me,
118
125
  {
119
- style: P.searchInput,
120
- placeholder: f || T("renderer.defaultAddressInput.enterAddress"),
121
- placeholderTextColor: "#9CA3AF",
122
- value: S,
123
- onChangeText: u,
126
+ style: [L.searchInput, { backgroundColor: j.muted, borderColor: j.border, color: j.text }],
127
+ placeholder: S || z("renderer.defaultAddressInput.enterAddress"),
128
+ placeholderTextColor: j.textMuted,
129
+ value: g,
130
+ onChangeText: a,
124
131
  autoFocus: !0,
125
132
  autoCapitalize: "none",
126
133
  autoCorrect: !1
127
134
  }
128
135
  ),
129
- C && /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6", style: P.searchLoader })
136
+ v && /* @__PURE__ */ e.jsx(he, { size: "small", color: j.primary, style: L.searchLoader })
130
137
  ] }),
131
- C ? /* @__PURE__ */ e.jsxs(l, { style: P.loadingContainer, children: [
132
- /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6" }),
133
- /* @__PURE__ */ e.jsx(t, { style: P.loadingText, children: T("renderer.defaultAddressInput.searching") })
138
+ v ? /* @__PURE__ */ e.jsxs(x, { style: L.loadingContainer, children: [
139
+ /* @__PURE__ */ e.jsx(he, { size: "small", color: j.primary }),
140
+ /* @__PURE__ */ e.jsx(t, { style: [L.loadingText, { color: j.textMuted }], children: z("renderer.defaultAddressInput.searching") })
134
141
  ] }) : /* @__PURE__ */ e.jsx(
135
- Fe,
142
+ fe,
136
143
  {
137
- data: x,
138
- keyExtractor: (k, _) => _.toString(),
139
- style: P.suggestionsList,
140
- contentContainerStyle: P.suggestionsListContent,
144
+ data: o,
145
+ keyExtractor: (D, N) => N.toString(),
146
+ style: L.suggestionsList,
147
+ contentContainerStyle: L.suggestionsListContent,
141
148
  keyboardShouldPersistTaps: "handled",
142
- ListEmptyComponent: S.length >= 3 ? /* @__PURE__ */ e.jsx(l, { style: P.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: P.emptyText, children: T("renderer.defaultAddressInput.noAddressesFound") }) }) : /* @__PURE__ */ e.jsx(l, { style: P.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: P.emptyText, children: T("renderer.defaultAddressInput.typeMinChars") }) }),
143
- renderItem: ({ item: k }) => /* @__PURE__ */ e.jsxs(h, { style: P.suggestionItem, onPress: () => q(k), activeOpacity: 0.7, children: [
144
- /* @__PURE__ */ e.jsx(t, { style: P.suggestionIcon, children: "📍" }),
145
- /* @__PURE__ */ e.jsx(t, { style: P.suggestionText, numberOfLines: 2, children: k.label })
149
+ ListEmptyComponent: g.length >= 3 ? /* @__PURE__ */ e.jsx(x, { style: L.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [L.emptyText, { color: j.textMuted }], children: z("renderer.defaultAddressInput.noAddressesFound") }) }) : /* @__PURE__ */ e.jsx(x, { style: L.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [L.emptyText, { color: j.textMuted }], children: z("renderer.defaultAddressInput.typeMinChars") }) }),
150
+ renderItem: ({ item: D }) => /* @__PURE__ */ e.jsxs(h, { style: L.suggestionItem, onPress: () => P(D), activeOpacity: 0.7, children: [
151
+ /* @__PURE__ */ e.jsx(t, { style: L.suggestionIcon, children: "📍" }),
152
+ /* @__PURE__ */ e.jsx(t, { style: [L.suggestionText, { color: j.text }], numberOfLines: 2, children: D.label })
146
153
  ] })
147
154
  }
148
155
  )
149
156
  ] }) }) }),
150
- n && /* @__PURE__ */ e.jsx(t, { style: P.error, children: n }),
151
- m && !n && /* @__PURE__ */ e.jsx(t, { style: P.helperText, children: m })
157
+ n && /* @__PURE__ */ e.jsx(t, { style: [L.error, { color: j.error }], children: n }),
158
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [L.helperText, { color: j.textMuted }], children: y })
152
159
  ] });
153
- }, P = $.create({
160
+ }, L = _.create({
154
161
  closeButton: {
155
- color: "#6B7280",
156
162
  fontSize: 24,
157
163
  fontWeight: "300"
158
164
  },
@@ -164,16 +170,13 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
164
170
  paddingVertical: 24
165
171
  },
166
172
  emptyText: {
167
- color: "#9CA3AF",
168
173
  fontSize: 14
169
174
  },
170
175
  error: {
171
- color: "#EF4444",
172
176
  fontSize: 12,
173
177
  marginTop: 4
174
178
  },
175
179
  helperText: {
176
- color: "#6B7280",
177
180
  fontSize: 12,
178
181
  marginTop: 4
179
182
  },
@@ -181,7 +184,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
181
184
  fontSize: 16
182
185
  },
183
186
  label: {
184
- color: "#374151",
185
187
  fontSize: 14,
186
188
  fontWeight: "500",
187
189
  marginBottom: 8
@@ -193,12 +195,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
193
195
  paddingVertical: 24
194
196
  },
195
197
  loadingText: {
196
- color: "#6B7280",
197
198
  fontSize: 14,
198
199
  marginLeft: 8
199
200
  },
200
201
  modalContent: {
201
- backgroundColor: "#FFFFFF",
202
202
  borderRadius: 12,
203
203
  maxHeight: "80%",
204
204
  padding: 16,
@@ -206,7 +206,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
206
206
  },
207
207
  modalHeader: {
208
208
  alignItems: "center",
209
- borderBottomColor: "#E5E7EB",
210
209
  borderBottomWidth: 1,
211
210
  flexDirection: "row",
212
211
  justifyContent: "space-between",
@@ -220,23 +219,16 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
220
219
  justifyContent: "center"
221
220
  },
222
221
  modalTitle: {
223
- color: "#111827",
224
222
  fontSize: 18,
225
223
  fontWeight: "600"
226
224
  },
227
- required: {
228
- color: "#EF4444"
229
- },
230
225
  searchContainer: {
231
226
  marginBottom: 12,
232
227
  position: "relative"
233
228
  },
234
229
  searchInput: {
235
- backgroundColor: "#F9FAFB",
236
- borderColor: "#D1D5DB",
237
230
  borderRadius: 6,
238
231
  borderWidth: 1,
239
- color: "#374151",
240
232
  fontSize: 14,
241
233
  paddingHorizontal: 12,
242
234
  paddingRight: 40,
@@ -267,14 +259,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
267
259
  flexGrow: 0
268
260
  },
269
261
  suggestionText: {
270
- color: "#374151",
271
262
  flex: 1,
272
263
  fontSize: 14
273
264
  },
274
265
  trigger: {
275
266
  alignItems: "center",
276
- backgroundColor: "#FFFFFF",
277
- borderColor: "#D1D5DB",
278
267
  borderRadius: 6,
279
268
  borderWidth: 1,
280
269
  flexDirection: "row",
@@ -282,76 +271,77 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
282
271
  paddingHorizontal: 12,
283
272
  paddingVertical: 10
284
273
  },
285
- triggerError: {
286
- borderColor: "#EF4444"
287
- },
288
- triggerPlaceholder: {
289
- color: "#9CA3AF"
290
- },
291
274
  triggerText: {
292
- color: "#374151",
293
275
  flex: 1,
294
276
  fontSize: 14
295
277
  }
296
- }), nt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
297
- const [B, y] = A(!1), [S, u] = A(""), x = ne(), i = r.data.options || [], c = i.find((j) => j.value === o), z = ue(() => {
298
- if (!S.trim())
299
- return i;
300
- const j = S.toLowerCase();
301
- return i.filter((T) => x(T.label).toLowerCase().includes(j) || T.value.toLowerCase().includes(j));
302
- }, [i, S, x]), C = (j) => {
303
- s(j === o ? "" : j), y(!1), u("");
304
- }, g = () => {
305
- y(!1), u("");
306
- }, b = () => o && c ? x(c.label) : f || x("renderer.defaultAutocompleteInput.selectOption");
307
- return /* @__PURE__ */ e.jsxs(l, { style: W.container, children: [
308
- /* @__PURE__ */ e.jsxs(t, { style: W.label, children: [
309
- a || r.data.name,
310
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: W.required, children: "*" })
278
+ }), lt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
279
+ const [p, l] = R(!1), [g, a] = R(""), o = se(), { colors: d } = q(), m = r.data.options || [], C = m.find((z) => z.value === s), v = xe(() => {
280
+ if (!g.trim())
281
+ return m;
282
+ const z = g.toLowerCase();
283
+ return m.filter((j) => o(j.label).toLowerCase().includes(z) || j.value.toLowerCase().includes(z));
284
+ }, [m, g, o]), w = (z) => {
285
+ i(z === s ? "" : z), l(!1), a("");
286
+ }, f = () => {
287
+ l(!1), a("");
288
+ }, b = () => s && C ? o(C.label) : S || o("renderer.defaultAutocompleteInput.selectOption");
289
+ return /* @__PURE__ */ e.jsxs(x, { style: E.container, children: [
290
+ /* @__PURE__ */ e.jsxs(t, { style: [E.label, { color: d.textSecondary }], children: [
291
+ c || r.data.name,
292
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: d.error }, children: "*" })
311
293
  ] }),
312
- /* @__PURE__ */ e.jsxs(h, { style: [W.trigger, n && W.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
313
- /* @__PURE__ */ e.jsx(t, { style: [W.triggerText, !o && W.triggerPlaceholder], numberOfLines: 1, children: b() }),
314
- /* @__PURE__ */ e.jsx(t, { style: W.arrow, children: "▼" })
315
- ] }),
316
- /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: g, children: /* @__PURE__ */ e.jsx(h, { style: W.modalOverlay, activeOpacity: 1, onPress: g, children: /* @__PURE__ */ e.jsxs(h, { style: W.modalContent, activeOpacity: 1, onPress: () => {
294
+ /* @__PURE__ */ e.jsxs(
295
+ h,
296
+ {
297
+ style: [E.trigger, { backgroundColor: d.input, borderColor: d.border }, n && { borderColor: d.error }],
298
+ onPress: () => l(!0),
299
+ activeOpacity: 0.7,
300
+ children: [
301
+ /* @__PURE__ */ e.jsx(t, { style: [E.triggerText, { color: d.text }, !s && { color: d.textMuted }], numberOfLines: 1, children: b() }),
302
+ /* @__PURE__ */ e.jsx(t, { style: [E.arrow, { color: d.textMuted }], children: "▼" })
303
+ ]
304
+ }
305
+ ),
306
+ /* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: f, children: /* @__PURE__ */ e.jsx(h, { style: E.modalOverlay, activeOpacity: 1, onPress: f, children: /* @__PURE__ */ e.jsxs(h, { style: [E.modalContent, { backgroundColor: d.card }], activeOpacity: 1, onPress: () => {
317
307
  }, children: [
318
- /* @__PURE__ */ e.jsxs(l, { style: W.modalHeader, children: [
319
- /* @__PURE__ */ e.jsx(t, { style: W.modalTitle, children: a || r.data.name }),
320
- /* @__PURE__ */ e.jsx(h, { onPress: g, children: /* @__PURE__ */ e.jsx(t, { style: W.closeButton, children: "✕" }) })
308
+ /* @__PURE__ */ e.jsxs(x, { style: [E.modalHeader, { borderBottomColor: d.separator }], children: [
309
+ /* @__PURE__ */ e.jsx(t, { style: [E.modalTitle, { color: d.text }], children: c || r.data.name }),
310
+ /* @__PURE__ */ e.jsx(h, { onPress: f, children: /* @__PURE__ */ e.jsx(t, { style: [E.closeButton, { color: d.textMuted }], children: "✕" }) })
321
311
  ] }),
322
- /* @__PURE__ */ e.jsx(l, { style: W.searchContainer, children: /* @__PURE__ */ e.jsx(
323
- ge,
312
+ /* @__PURE__ */ e.jsx(x, { style: E.searchContainer, children: /* @__PURE__ */ e.jsx(
313
+ me,
324
314
  {
325
- style: W.searchInput,
326
- placeholder: f || x("renderer.defaultAutocompleteInput.search"),
327
- placeholderTextColor: "#9CA3AF",
328
- value: S,
329
- onChangeText: u,
315
+ style: [E.searchInput, { backgroundColor: d.muted, borderColor: d.border, color: d.text }],
316
+ placeholder: S || o("renderer.defaultAutocompleteInput.search"),
317
+ placeholderTextColor: d.textMuted,
318
+ value: g,
319
+ onChangeText: a,
330
320
  autoFocus: !0,
331
321
  autoCapitalize: "none",
332
322
  autoCorrect: !1
333
323
  }
334
324
  ) }),
335
325
  /* @__PURE__ */ e.jsx(
336
- Fe,
326
+ fe,
337
327
  {
338
- data: z,
339
- keyExtractor: (j) => j.value,
340
- style: W.optionsList,
341
- contentContainerStyle: W.optionsListContent,
342
- ListEmptyComponent: /* @__PURE__ */ e.jsx(l, { style: W.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: W.emptyText, children: x("renderer.defaultAutocompleteInput.noResults") }) }),
343
- renderItem: ({ item: j }) => {
344
- const T = j.value === o;
328
+ data: v,
329
+ keyExtractor: (z) => z.value,
330
+ style: E.optionsList,
331
+ contentContainerStyle: E.optionsListContent,
332
+ ListEmptyComponent: /* @__PURE__ */ e.jsx(x, { style: E.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [E.emptyText, { color: d.textMuted }], children: o("renderer.defaultAutocompleteInput.noResults") }) }),
333
+ renderItem: ({ item: z }) => {
334
+ const j = z.value === s;
345
335
  return /* @__PURE__ */ e.jsxs(
346
336
  h,
347
337
  {
348
- style: [W.option, T && W.optionSelected],
349
- onPress: () => C(j.value),
350
- disabled: j.disabled,
338
+ style: [E.option, j && { backgroundColor: d.primaryLight }],
339
+ onPress: () => w(z.value),
340
+ disabled: z.disabled,
351
341
  activeOpacity: 0.7,
352
342
  children: [
353
- /* @__PURE__ */ e.jsx(t, { style: [W.optionText, j.disabled && W.optionTextDisabled], children: x(j.label) }),
354
- T && /* @__PURE__ */ e.jsx(t, { style: W.checkmark, children: "✓" })
343
+ /* @__PURE__ */ e.jsx(t, { style: [E.optionText, { color: d.text }, z.disabled && { color: d.textMuted }], children: o(z.label) }),
344
+ j && /* @__PURE__ */ e.jsx(t, { style: [E.checkmark, { color: d.primary }], children: "✓" })
355
345
  ]
356
346
  }
357
347
  );
@@ -359,21 +349,18 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
359
349
  }
360
350
  )
361
351
  ] }) }) }),
362
- n && /* @__PURE__ */ e.jsx(t, { style: W.error, children: n }),
363
- m && !n && /* @__PURE__ */ e.jsx(t, { style: W.helperText, children: m })
352
+ n && /* @__PURE__ */ e.jsx(t, { style: [E.error, { color: d.error }], children: n }),
353
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [E.helperText, { color: d.textMuted }], children: y })
364
354
  ] });
365
- }, W = $.create({
355
+ }, E = _.create({
366
356
  arrow: {
367
- color: "#6B7280",
368
357
  fontSize: 12
369
358
  },
370
359
  checkmark: {
371
- color: "#3B82F6",
372
360
  fontSize: 18,
373
361
  fontWeight: "700"
374
362
  },
375
363
  closeButton: {
376
- color: "#6B7280",
377
364
  fontSize: 24,
378
365
  fontWeight: "300"
379
366
  },
@@ -385,27 +372,22 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
385
372
  paddingVertical: 24
386
373
  },
387
374
  emptyText: {
388
- color: "#9CA3AF",
389
375
  fontSize: 14
390
376
  },
391
377
  error: {
392
- color: "#EF4444",
393
378
  fontSize: 12,
394
379
  marginTop: 4
395
380
  },
396
381
  helperText: {
397
- color: "#6B7280",
398
382
  fontSize: 12,
399
383
  marginTop: 4
400
384
  },
401
385
  label: {
402
- color: "#374151",
403
386
  fontSize: 14,
404
387
  fontWeight: "500",
405
388
  marginBottom: 8
406
389
  },
407
390
  modalContent: {
408
- backgroundColor: "#FFFFFF",
409
391
  borderRadius: 12,
410
392
  maxHeight: "80%",
411
393
  padding: 16,
@@ -413,7 +395,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
413
395
  },
414
396
  modalHeader: {
415
397
  alignItems: "center",
416
- borderBottomColor: "#E5E7EB",
417
398
  borderBottomWidth: 1,
418
399
  flexDirection: "row",
419
400
  justifyContent: "space-between",
@@ -427,7 +408,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
427
408
  justifyContent: "center"
428
409
  },
429
410
  modalTitle: {
430
- color: "#111827",
431
411
  fontSize: 18,
432
412
  fontWeight: "600"
433
413
  },
@@ -439,9 +419,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
439
419
  paddingHorizontal: 12,
440
420
  paddingVertical: 12
441
421
  },
442
- optionSelected: {
443
- backgroundColor: "#EFF6FF"
444
- },
445
422
  optionsList: {
446
423
  flexGrow: 0,
447
424
  flexShrink: 1
@@ -450,33 +427,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
450
427
  flexGrow: 0
451
428
  },
452
429
  optionText: {
453
- color: "#374151",
454
430
  flex: 1,
455
431
  fontSize: 14
456
432
  },
457
- optionTextDisabled: {
458
- color: "#9CA3AF"
459
- },
460
- required: {
461
- color: "#EF4444"
462
- },
463
433
  searchContainer: {
464
434
  marginBottom: 12
465
435
  },
466
436
  searchInput: {
467
- backgroundColor: "#F9FAFB",
468
- borderColor: "#D1D5DB",
469
437
  borderRadius: 6,
470
438
  borderWidth: 1,
471
- color: "#374151",
472
439
  fontSize: 14,
473
440
  paddingHorizontal: 12,
474
441
  paddingVertical: 10
475
442
  },
476
443
  trigger: {
477
444
  alignItems: "center",
478
- backgroundColor: "#FFFFFF",
479
- borderColor: "#D1D5DB",
480
445
  borderRadius: 6,
481
446
  borderWidth: 1,
482
447
  flexDirection: "row",
@@ -484,74 +449,85 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
484
449
  paddingHorizontal: 12,
485
450
  paddingVertical: 10
486
451
  },
487
- triggerError: {
488
- borderColor: "#EF4444"
489
- },
490
- triggerPlaceholder: {
491
- color: "#9CA3AF"
492
- },
493
452
  triggerText: {
494
- color: "#374151",
495
453
  flex: 1,
496
454
  fontSize: 14
497
455
  }
498
- }), ot = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
499
- const m = ne(), B = r.data.options || [], y = B.length > 0, S = Array.isArray(o) ? o : [], u = typeof o == "boolean" ? o : !1, x = (c) => {
500
- if (y) {
501
- const z = S.includes(c) ? S.filter((C) => C !== c) : [...S, c];
502
- s(z);
456
+ }), it = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
457
+ const y = se(), { colors: p } = q(), l = r.data.options || [], g = l.length > 0, a = Array.isArray(s) ? s : [], o = typeof s == "boolean" ? s : !1, d = (C) => {
458
+ if (g) {
459
+ const v = a.includes(C) ? a.filter((w) => w !== C) : [...a, C];
460
+ i(v);
503
461
  } else
504
- s(!u);
505
- }, i = (c) => y ? S.includes(c) : u;
506
- return /* @__PURE__ */ e.jsxs(l, { style: Z.container, children: [
507
- /* @__PURE__ */ e.jsxs(t, { style: Z.label, children: [
508
- a || r.data.name,
509
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: Z.required, children: "*" })
462
+ i(!o);
463
+ }, m = (C) => g ? a.includes(C) : o;
464
+ return /* @__PURE__ */ e.jsxs(x, { style: ne.container, children: [
465
+ /* @__PURE__ */ e.jsxs(t, { style: [ne.label, { color: p.textSecondary }], children: [
466
+ c || r.data.name,
467
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: p.error }, children: "*" })
510
468
  ] }),
511
- B.length > 0 ? B.map((c) => /* @__PURE__ */ e.jsxs(
469
+ l.length > 0 ? l.map((C) => /* @__PURE__ */ e.jsxs(
512
470
  h,
513
471
  {
514
- style: Z.option,
515
- onPress: () => x(c.value),
516
- disabled: c.disabled,
472
+ style: ne.option,
473
+ onPress: () => d(C.value),
474
+ disabled: C.disabled,
517
475
  activeOpacity: 0.7,
518
476
  accessible: !0,
519
477
  accessibilityRole: "checkbox",
520
- accessibilityState: { checked: i(c.value), disabled: c.disabled },
521
- accessibilityLabel: m(c.label) || c.value,
478
+ accessibilityState: { checked: m(C.value), disabled: C.disabled },
479
+ accessibilityLabel: y(C.label) || C.value,
522
480
  children: [
523
- /* @__PURE__ */ e.jsx(l, { style: [Z.checkbox, i(c.value) && Z.checkboxChecked], children: i(c.value) && /* @__PURE__ */ e.jsx(t, { style: Z.checkmark, children: "✓" }) }),
524
- /* @__PURE__ */ e.jsx(t, { style: [Z.optionLabel, c.disabled && Z.optionLabelDisabled], children: m(c.label) || c.value })
481
+ /* @__PURE__ */ e.jsx(
482
+ x,
483
+ {
484
+ style: [
485
+ ne.checkbox,
486
+ { backgroundColor: p.input, borderColor: p.border },
487
+ m(C.value) && { backgroundColor: p.primary, borderColor: p.primary }
488
+ ],
489
+ children: m(C.value) && /* @__PURE__ */ e.jsx(t, { style: ne.checkmark, children: "✓" })
490
+ }
491
+ ),
492
+ /* @__PURE__ */ e.jsx(t, { style: [ne.optionLabel, { color: p.textSecondary }, C.disabled && { color: p.textMuted }], children: y(C.label) || C.value })
525
493
  ]
526
494
  },
527
- c.value
495
+ C.value
528
496
  )) : (
529
497
  // Single checkbox without options
530
498
  /* @__PURE__ */ e.jsxs(
531
499
  h,
532
500
  {
533
- style: Z.option,
534
- onPress: () => x(""),
501
+ style: ne.option,
502
+ onPress: () => d(""),
535
503
  activeOpacity: 0.7,
536
504
  accessible: !0,
537
505
  accessibilityRole: "checkbox",
538
- accessibilityState: { checked: u },
539
- accessibilityLabel: a || r.data.name,
506
+ accessibilityState: { checked: o },
507
+ accessibilityLabel: c || r.data.name,
540
508
  children: [
541
- /* @__PURE__ */ e.jsx(l, { style: [Z.checkbox, u && Z.checkboxChecked], children: u && /* @__PURE__ */ e.jsx(t, { style: Z.checkmark, children: "✓" }) }),
542
- /* @__PURE__ */ e.jsx(t, { style: Z.optionLabel, children: a || r.data.name })
509
+ /* @__PURE__ */ e.jsx(
510
+ x,
511
+ {
512
+ style: [
513
+ ne.checkbox,
514
+ { backgroundColor: p.input, borderColor: p.border },
515
+ o && { backgroundColor: p.primary, borderColor: p.primary }
516
+ ],
517
+ children: o && /* @__PURE__ */ e.jsx(t, { style: ne.checkmark, children: "✓" })
518
+ }
519
+ ),
520
+ /* @__PURE__ */ e.jsx(t, { style: [ne.optionLabel, { color: p.textSecondary }], children: c || r.data.name })
543
521
  ]
544
522
  }
545
523
  )
546
524
  ),
547
- n && /* @__PURE__ */ e.jsx(t, { style: Z.error, children: n }),
548
- f && !n && /* @__PURE__ */ e.jsx(t, { style: Z.helperText, children: f })
525
+ n && /* @__PURE__ */ e.jsx(t, { style: [ne.error, { color: p.error }], children: n }),
526
+ S && !n && /* @__PURE__ */ e.jsx(t, { style: [ne.helperText, { color: p.textMuted }], children: S })
549
527
  ] });
550
- }, Z = $.create({
528
+ }, ne = _.create({
551
529
  checkbox: {
552
530
  alignItems: "center",
553
- backgroundColor: "#FFFFFF",
554
- borderColor: "#D1D5DB",
555
531
  borderRadius: 4,
556
532
  borderWidth: 2,
557
533
  height: 20,
@@ -559,10 +535,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
559
535
  marginRight: 12,
560
536
  width: 20
561
537
  },
562
- checkboxChecked: {
563
- backgroundColor: "#3B82F6",
564
- borderColor: "#3B82F6"
565
- },
566
538
  checkmark: {
567
539
  color: "#FFFFFF",
568
540
  fontSize: 14,
@@ -572,17 +544,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
572
544
  marginBottom: 16
573
545
  },
574
546
  error: {
575
- color: "#EF4444",
576
547
  fontSize: 12,
577
548
  marginTop: 4
578
549
  },
579
550
  helperText: {
580
- color: "#6B7280",
581
551
  fontSize: 12,
582
552
  marginTop: 4
583
553
  },
584
554
  label: {
585
- color: "#374151",
586
555
  fontSize: 14,
587
556
  fontWeight: "500",
588
557
  marginBottom: 8
@@ -593,21 +562,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
593
562
  marginBottom: 8
594
563
  },
595
564
  optionLabel: {
596
- color: "#374151",
597
565
  flex: 1,
598
566
  fontSize: 14
599
- },
600
- optionLabelDisabled: {
601
- color: "#9CA3AF"
602
- },
603
- required: {
604
- color: "#EF4444"
605
567
  }
606
- }), st = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
607
- const [B, y] = A(!1), S = ne(), u = o ? new Date(o) : void 0, { year: x, month: i, today: c } = ue(() => {
608
- const p = u || /* @__PURE__ */ new Date(), H = p.getFullYear(), Q = p.getMonth(), U = /* @__PURE__ */ new Date();
609
- return U.setHours(0, 0, 0, 0), { month: Q, today: U, year: H };
610
- }, [u]), [z, C] = A(x), [g, b] = A(i), j = [
568
+ }), at = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
569
+ const [p, l] = R(!1), g = se(), { colors: a } = q(), o = s ? new Date(s) : void 0, { year: d, month: m, today: C } = xe(() => {
570
+ const T = o || /* @__PURE__ */ new Date(), A = T.getFullYear(), Z = T.getMonth(), Q = /* @__PURE__ */ new Date();
571
+ return Q.setHours(0, 0, 0, 0), { month: Z, today: Q, year: A };
572
+ }, [o]), [v, w] = R(d), [f, b] = R(m), z = [
611
573
  "January",
612
574
  "February",
613
575
  "March",
@@ -620,96 +582,105 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
620
582
  "October",
621
583
  "November",
622
584
  "December"
623
- ], T = ue(() => {
624
- const p = new Date(z, g, 1).getDay(), H = new Date(z, g + 1, 0).getDate(), Q = new Date(z, g, 0).getDate(), U = [];
625
- for (let v = p - 1; v >= 0; v--)
626
- U.push({
627
- date: new Date(z, g - 1, Q - v),
628
- day: Q - v,
585
+ ], j = xe(() => {
586
+ const T = new Date(v, f, 1).getDay(), A = new Date(v, f + 1, 0).getDate(), Z = new Date(v, f, 0).getDate(), Q = [];
587
+ for (let B = T - 1; B >= 0; B--)
588
+ Q.push({
589
+ date: new Date(v, f - 1, Z - B),
590
+ day: Z - B,
629
591
  isCurrentMonth: !1
630
592
  });
631
- for (let v = 1; v <= H; v++)
632
- U.push({
633
- date: new Date(z, g, v),
634
- day: v,
593
+ for (let B = 1; B <= A; B++)
594
+ Q.push({
595
+ date: new Date(v, f, B),
596
+ day: B,
635
597
  isCurrentMonth: !0
636
598
  });
637
- const F = 42 - U.length;
638
- for (let v = 1; v <= F; v++)
639
- U.push({
640
- date: new Date(z, g + 1, v),
641
- day: v,
599
+ const I = 42 - Q.length;
600
+ for (let B = 1; B <= I; B++)
601
+ Q.push({
602
+ date: new Date(v, f + 1, B),
603
+ day: B,
642
604
  isCurrentMonth: !1
643
605
  });
644
- return U;
645
- }, [z, g]), q = he(
646
- (p) => {
647
- r.data.disablePast && p < c || (s(p.toISOString()), y(!1));
606
+ return Q;
607
+ }, [v, f]), P = ye(
608
+ (T) => {
609
+ r.data.disablePast && T < C || (i(T.toISOString()), l(!1));
648
610
  },
649
- [r.data.disablePast, c, s]
650
- ), R = () => {
651
- g === 0 ? (b(11), C(z - 1)) : b(g - 1);
652
- }, k = () => {
653
- g === 11 ? (b(0), C(z + 1)) : b(g + 1);
654
- }, _ = () => u ? u.toLocaleDateString() : f || S("renderer.defaultInputs.selectDate"), K = (p) => r.data.disablePast ? p < c : !1, ee = (p) => u ? p.getDate() === u.getDate() && p.getMonth() === u.getMonth() && p.getFullYear() === u.getFullYear() : !1;
655
- return /* @__PURE__ */ e.jsxs(l, { style: E.container, children: [
656
- /* @__PURE__ */ e.jsxs(t, { style: E.label, children: [
657
- a || r.data.name,
658
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: E.required, children: "*" })
611
+ [r.data.disablePast, C, i]
612
+ ), u = () => {
613
+ f === 0 ? (b(11), w(v - 1)) : b(f - 1);
614
+ }, D = () => {
615
+ f === 11 ? (b(0), w(v + 1)) : b(f + 1);
616
+ }, N = () => o ? o.toLocaleDateString() : S || g("renderer.defaultInputs.selectDate"), K = (T) => r.data.disablePast ? T < C : !1, te = (T) => o ? T.getDate() === o.getDate() && T.getMonth() === o.getMonth() && T.getFullYear() === o.getFullYear() : !1;
617
+ return /* @__PURE__ */ e.jsxs(x, { style: F.container, children: [
618
+ /* @__PURE__ */ e.jsxs(t, { style: [F.label, { color: a.textSecondary }], children: [
619
+ c || r.data.name,
620
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: a.error }, children: "*" })
659
621
  ] }),
660
- /* @__PURE__ */ e.jsxs(h, { style: [E.trigger, n && E.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
661
- /* @__PURE__ */ e.jsx(t, { style: [E.triggerText, !o && E.triggerPlaceholder], numberOfLines: 1, children: _() }),
662
- /* @__PURE__ */ e.jsx(t, { style: E.icon, children: "📅" })
663
- ] }),
664
- /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: () => y(!1), children: /* @__PURE__ */ e.jsx(h, { style: E.modalOverlay, activeOpacity: 1, onPress: () => y(!1), children: /* @__PURE__ */ e.jsxs(h, { style: E.modalContent, activeOpacity: 1, onPress: () => {
622
+ /* @__PURE__ */ e.jsxs(
623
+ h,
624
+ {
625
+ style: [F.trigger, { backgroundColor: a.input, borderColor: a.border }, n && { borderColor: a.error }],
626
+ onPress: () => l(!0),
627
+ activeOpacity: 0.7,
628
+ children: [
629
+ /* @__PURE__ */ e.jsx(t, { style: [F.triggerText, { color: a.text }, !s && { color: a.textMuted }], numberOfLines: 1, children: N() }),
630
+ /* @__PURE__ */ e.jsx(t, { style: F.icon, children: "📅" })
631
+ ]
632
+ }
633
+ ),
634
+ /* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: () => l(!1), children: /* @__PURE__ */ e.jsx(h, { style: F.modalOverlay, activeOpacity: 1, onPress: () => l(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [F.modalContent, { backgroundColor: a.card }], activeOpacity: 1, onPress: () => {
665
635
  }, children: [
666
- /* @__PURE__ */ e.jsxs(l, { style: E.modalHeader, children: [
667
- /* @__PURE__ */ e.jsx(t, { style: E.modalTitle, children: a || r.data.name }),
668
- /* @__PURE__ */ e.jsx(h, { onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: E.closeButton, children: "✕" }) })
636
+ /* @__PURE__ */ e.jsxs(x, { style: [F.modalHeader, { borderBottomColor: a.separator }], children: [
637
+ /* @__PURE__ */ e.jsx(t, { style: [F.modalTitle, { color: a.text }], children: c || r.data.name }),
638
+ /* @__PURE__ */ e.jsx(h, { onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: [F.closeButton, { color: a.textMuted }], children: "✕" }) })
669
639
  ] }),
670
- /* @__PURE__ */ e.jsxs(l, { style: E.calendarHeader, children: [
671
- /* @__PURE__ */ e.jsx(h, { onPress: R, style: E.navButton, children: /* @__PURE__ */ e.jsx(t, { style: E.navButtonText, children: "‹" }) }),
672
- /* @__PURE__ */ e.jsxs(t, { style: E.monthYear, children: [
673
- j[g],
640
+ /* @__PURE__ */ e.jsxs(x, { style: F.calendarHeader, children: [
641
+ /* @__PURE__ */ e.jsx(h, { onPress: u, style: F.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [F.navButtonText, { color: a.primary }], children: "‹" }) }),
642
+ /* @__PURE__ */ e.jsxs(t, { style: [F.monthYear, { color: a.text }], children: [
643
+ z[f],
674
644
  " ",
675
- z
645
+ v
676
646
  ] }),
677
- /* @__PURE__ */ e.jsx(h, { onPress: k, style: E.navButton, children: /* @__PURE__ */ e.jsx(t, { style: E.navButtonText, children: "›" }) })
647
+ /* @__PURE__ */ e.jsx(h, { onPress: D, style: F.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [F.navButtonText, { color: a.primary }], children: "›" }) })
678
648
  ] }),
679
- /* @__PURE__ */ e.jsx(l, { style: E.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((p) => /* @__PURE__ */ e.jsx(t, { style: E.weekDay, children: p }, p)) }),
649
+ /* @__PURE__ */ e.jsx(x, { style: F.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((T) => /* @__PURE__ */ e.jsx(t, { style: [F.weekDay, { color: a.textMuted }], children: T }, T)) }),
680
650
  /* @__PURE__ */ e.jsx(
681
- Fe,
651
+ fe,
682
652
  {
683
- data: T,
684
- keyExtractor: (p, H) => `${p.date.getTime()}-${H}`,
653
+ data: j,
654
+ keyExtractor: (T, A) => `${T.date.getTime()}-${A}`,
685
655
  numColumns: 7,
686
656
  scrollEnabled: !1,
687
- style: E.calendar,
688
- contentContainerStyle: E.calendarContent,
689
- renderItem: ({ item: p }) => {
690
- const H = K(p.date), Q = ee(p.date);
657
+ style: F.calendar,
658
+ contentContainerStyle: F.calendarContent,
659
+ renderItem: ({ item: T }) => {
660
+ const A = K(T.date), Z = te(T.date);
691
661
  return /* @__PURE__ */ e.jsx(
692
662
  h,
693
663
  {
694
664
  style: [
695
- E.dayCell,
696
- !p.isCurrentMonth && E.dayCellOtherMonth,
697
- Q && E.dayCellSelected,
698
- H && E.dayCellDisabled
665
+ F.dayCell,
666
+ !T.isCurrentMonth && F.dayCellOtherMonth,
667
+ Z && { backgroundColor: a.primary, borderRadius: 20 },
668
+ A && F.dayCellDisabled
699
669
  ],
700
- onPress: () => q(p.date),
701
- disabled: H,
670
+ onPress: () => P(T.date),
671
+ disabled: A,
702
672
  activeOpacity: 0.7,
703
673
  children: /* @__PURE__ */ e.jsx(
704
674
  t,
705
675
  {
706
676
  style: [
707
- E.dayText,
708
- !p.isCurrentMonth && E.dayTextOtherMonth,
709
- Q && E.dayTextSelected,
710
- H && E.dayTextDisabled
677
+ F.dayText,
678
+ { color: a.text },
679
+ !T.isCurrentMonth && { color: a.textMuted },
680
+ Z && { color: a.background, fontWeight: "600" },
681
+ A && { color: a.textMuted }
711
682
  ],
712
- children: p.day
683
+ children: T.day
713
684
  }
714
685
  )
715
686
  }
@@ -718,10 +689,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
718
689
  }
719
690
  )
720
691
  ] }) }) }),
721
- n && /* @__PURE__ */ e.jsx(t, { style: E.error, children: n }),
722
- m && !n && /* @__PURE__ */ e.jsx(t, { style: E.helperText, children: m })
692
+ n && /* @__PURE__ */ e.jsx(t, { style: [F.error, { color: a.error }], children: n }),
693
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [F.helperText, { color: a.textMuted }], children: y })
723
694
  ] });
724
- }, E = $.create({
695
+ }, F = _.create({
725
696
  calendar: {
726
697
  flexGrow: 0,
727
698
  flexShrink: 1
@@ -737,7 +708,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
737
708
  paddingHorizontal: 8
738
709
  },
739
710
  closeButton: {
740
- color: "#6B7280",
741
711
  fontSize: 24,
742
712
  fontWeight: "300"
743
713
  },
@@ -758,31 +728,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
758
728
  dayCellOtherMonth: {
759
729
  opacity: 0.3
760
730
  },
761
- dayCellSelected: {
762
- backgroundColor: "#3B82F6",
763
- borderRadius: 20
764
- },
765
731
  dayText: {
766
- color: "#374151",
767
732
  fontSize: 14
768
733
  },
769
- dayTextDisabled: {
770
- color: "#9CA3AF"
771
- },
772
- dayTextOtherMonth: {
773
- color: "#9CA3AF"
774
- },
775
- dayTextSelected: {
776
- color: "#FFFFFF",
777
- fontWeight: "600"
778
- },
779
734
  error: {
780
- color: "#EF4444",
781
735
  fontSize: 12,
782
736
  marginTop: 4
783
737
  },
784
738
  helperText: {
785
- color: "#6B7280",
786
739
  fontSize: 12,
787
740
  marginTop: 4
788
741
  },
@@ -790,13 +743,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
790
743
  fontSize: 16
791
744
  },
792
745
  label: {
793
- color: "#374151",
794
746
  fontSize: 14,
795
747
  fontWeight: "500",
796
748
  marginBottom: 8
797
749
  },
798
750
  modalContent: {
799
- backgroundColor: "#FFFFFF",
800
751
  borderRadius: 12,
801
752
  maxHeight: "80%",
802
753
  padding: 16,
@@ -804,7 +755,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
804
755
  },
805
756
  modalHeader: {
806
757
  alignItems: "center",
807
- borderBottomColor: "#E5E7EB",
808
758
  borderBottomWidth: 1,
809
759
  flexDirection: "row",
810
760
  justifyContent: "space-between",
@@ -818,12 +768,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
818
768
  justifyContent: "center"
819
769
  },
820
770
  modalTitle: {
821
- color: "#111827",
822
771
  fontSize: 18,
823
772
  fontWeight: "600"
824
773
  },
825
774
  monthYear: {
826
- color: "#111827",
827
775
  fontSize: 16,
828
776
  fontWeight: "600"
829
777
  },
@@ -831,17 +779,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
831
779
  padding: 8
832
780
  },
833
781
  navButtonText: {
834
- color: "#3B82F6",
835
782
  fontSize: 24,
836
783
  fontWeight: "600"
837
784
  },
838
- required: {
839
- color: "#EF4444"
840
- },
841
785
  trigger: {
842
786
  alignItems: "center",
843
- backgroundColor: "#FFFFFF",
844
- borderColor: "#D1D5DB",
845
787
  borderRadius: 6,
846
788
  borderWidth: 1,
847
789
  flexDirection: "row",
@@ -849,19 +791,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
849
791
  paddingHorizontal: 12,
850
792
  paddingVertical: 10
851
793
  },
852
- triggerError: {
853
- borderColor: "#EF4444"
854
- },
855
- triggerPlaceholder: {
856
- color: "#9CA3AF"
857
- },
858
794
  triggerText: {
859
- color: "#374151",
860
795
  flex: 1,
861
796
  fontSize: 14
862
797
  },
863
798
  weekDay: {
864
- color: "#6B7280",
865
799
  flex: 1,
866
800
  fontSize: 12,
867
801
  fontWeight: "600",
@@ -872,11 +806,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
872
806
  flexDirection: "row",
873
807
  marginBottom: 8
874
808
  }
875
- }), it = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
876
- const [m, B] = A(!1), [y, S] = A(!0), u = ne(), x = Array.isArray(o) ? o : [], i = x[0] ? new Date(x[0]) : void 0, c = x[1] ? new Date(x[1]) : void 0, { year: z, month: C, today: g } = ue(() => {
877
- const F = i || /* @__PURE__ */ new Date(), v = F.getFullYear(), X = F.getMonth(), O = /* @__PURE__ */ new Date();
878
- return O.setHours(0, 0, 0, 0), { month: X, today: O, year: v };
879
- }, [i]), [b, j] = A(z), [T, q] = A(C), R = [
809
+ }), ct = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
810
+ const [y, p] = R(!1), [l, g] = R(!0), a = se(), { colors: o } = q(), d = Array.isArray(s) ? s : [], m = d[0] ? new Date(d[0]) : void 0, C = d[1] ? new Date(d[1]) : void 0, { year: v, month: w, today: f } = xe(() => {
811
+ const I = m || /* @__PURE__ */ new Date(), B = I.getFullYear(), ee = I.getMonth(), M = /* @__PURE__ */ new Date();
812
+ return M.setHours(0, 0, 0, 0), { month: ee, today: M, year: B };
813
+ }, [m]), [b, z] = R(v), [j, P] = R(w), u = [
880
814
  "January",
881
815
  "February",
882
816
  "March",
@@ -889,104 +823,113 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
889
823
  "October",
890
824
  "November",
891
825
  "December"
892
- ], k = ue(() => {
893
- const F = new Date(b, T, 1).getDay(), v = new Date(b, T + 1, 0).getDate(), X = new Date(b, T, 0).getDate(), O = [];
894
- for (let V = F - 1; V >= 0; V--)
895
- O.push({
896
- date: new Date(b, T - 1, X - V),
897
- day: X - V,
826
+ ], D = xe(() => {
827
+ const I = new Date(b, j, 1).getDay(), B = new Date(b, j + 1, 0).getDate(), ee = new Date(b, j, 0).getDate(), M = [];
828
+ for (let $ = I - 1; $ >= 0; $--)
829
+ M.push({
830
+ date: new Date(b, j - 1, ee - $),
831
+ day: ee - $,
898
832
  isCurrentMonth: !1
899
833
  });
900
- for (let V = 1; V <= v; V++)
901
- O.push({
902
- date: new Date(b, T, V),
903
- day: V,
834
+ for (let $ = 1; $ <= B; $++)
835
+ M.push({
836
+ date: new Date(b, j, $),
837
+ day: $,
904
838
  isCurrentMonth: !0
905
839
  });
906
- const ce = 42 - O.length;
907
- for (let V = 1; V <= ce; V++)
908
- O.push({
909
- date: new Date(b, T + 1, V),
910
- day: V,
840
+ const ce = 42 - M.length;
841
+ for (let $ = 1; $ <= ce; $++)
842
+ M.push({
843
+ date: new Date(b, j + 1, $),
844
+ day: $,
911
845
  isCurrentMonth: !1
912
846
  });
913
- return O;
914
- }, [b, T]), _ = he(
915
- (F) => {
916
- r.data.disablePast && F < g || (y ? (s([F.toISOString(), c?.toISOString()]), S(!1)) : (i && F < i ? s([F.toISOString(), i.toISOString()]) : s([i?.toISOString(), F.toISOString()]), B(!1), S(!0)));
847
+ return M;
848
+ }, [b, j]), N = ye(
849
+ (I) => {
850
+ r.data.disablePast && I < f || (l ? (i([I.toISOString(), C?.toISOString()]), g(!1)) : (m && I < m ? i([I.toISOString(), m.toISOString()]) : i([m?.toISOString(), I.toISOString()]), p(!1), g(!0)));
917
851
  },
918
- [r.data.disablePast, g, y, i, c, s]
852
+ [r.data.disablePast, f, l, m, C, i]
919
853
  ), K = () => {
920
- T === 0 ? (q(11), j(b - 1)) : q(T - 1);
921
- }, ee = () => {
922
- T === 11 ? (q(0), j(b + 1)) : q(T + 1);
923
- }, p = () => i && c ? `${i.toLocaleDateString()} - ${c.toLocaleDateString()}` : i ? i.toLocaleDateString() : u("renderer.defaultInputs.selectDateRange"), H = (F) => r.data.disablePast ? F < g : !1, Q = (F) => i && c ? F >= i && F <= c : !1, U = (F) => {
924
- if (!(i || c))
854
+ j === 0 ? (P(11), z(b - 1)) : P(j - 1);
855
+ }, te = () => {
856
+ j === 11 ? (P(0), z(b + 1)) : P(j + 1);
857
+ }, T = () => m && C ? `${m.toLocaleDateString()} - ${C.toLocaleDateString()}` : m ? m.toLocaleDateString() : a("renderer.defaultInputs.selectDateRange"), A = (I) => r.data.disablePast ? I < f : !1, Z = (I) => m && C ? I >= m && I <= C : !1, Q = (I) => {
858
+ if (!(m || C))
925
859
  return !1;
926
- const v = i && F.getDate() === i.getDate() && F.getMonth() === i.getMonth() && F.getFullYear() === i.getFullYear(), X = c && F.getDate() === c.getDate() && F.getMonth() === c.getMonth() && F.getFullYear() === c.getFullYear();
927
- return v || X;
860
+ const B = m && I.getDate() === m.getDate() && I.getMonth() === m.getMonth() && I.getFullYear() === m.getFullYear(), ee = C && I.getDate() === C.getDate() && I.getMonth() === C.getMonth() && I.getFullYear() === C.getFullYear();
861
+ return B || ee;
928
862
  };
929
- return /* @__PURE__ */ e.jsxs(l, { style: D.container, children: [
930
- /* @__PURE__ */ e.jsxs(t, { style: D.label, children: [
931
- a || r.data.name,
932
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: D.required, children: "*" })
933
- ] }),
934
- /* @__PURE__ */ e.jsxs(h, { style: [D.trigger, n && D.triggerError], onPress: () => B(!0), activeOpacity: 0.7, children: [
935
- /* @__PURE__ */ e.jsx(t, { style: [D.triggerText, !i && D.triggerPlaceholder], numberOfLines: 1, children: p() }),
936
- /* @__PURE__ */ e.jsx(t, { style: D.icon, children: "📅" })
863
+ return /* @__PURE__ */ e.jsxs(x, { style: W.container, children: [
864
+ /* @__PURE__ */ e.jsxs(t, { style: [W.label, { color: o.textSecondary }], children: [
865
+ c || r.data.name,
866
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
937
867
  ] }),
938
- /* @__PURE__ */ e.jsx(ae, { visible: m, transparent: !0, animationType: "fade", onRequestClose: () => B(!1), children: /* @__PURE__ */ e.jsx(h, { style: D.modalOverlay, activeOpacity: 1, onPress: () => B(!1), children: /* @__PURE__ */ e.jsxs(h, { style: D.modalContent, activeOpacity: 1, onPress: () => {
868
+ /* @__PURE__ */ e.jsxs(
869
+ h,
870
+ {
871
+ style: [W.trigger, { backgroundColor: o.input, borderColor: o.border }, n && { borderColor: o.error }],
872
+ onPress: () => p(!0),
873
+ activeOpacity: 0.7,
874
+ children: [
875
+ /* @__PURE__ */ e.jsx(t, { style: [W.triggerText, { color: o.text }, !m && { color: o.textMuted }], numberOfLines: 1, children: T() }),
876
+ /* @__PURE__ */ e.jsx(t, { style: W.icon, children: "📅" })
877
+ ]
878
+ }
879
+ ),
880
+ /* @__PURE__ */ e.jsx(ae, { visible: y, transparent: !0, animationType: "fade", onRequestClose: () => p(!1), children: /* @__PURE__ */ e.jsx(h, { style: W.modalOverlay, activeOpacity: 1, onPress: () => p(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [W.modalContent, { backgroundColor: o.card }], activeOpacity: 1, onPress: () => {
939
881
  }, children: [
940
- /* @__PURE__ */ e.jsxs(l, { style: D.modalHeader, children: [
941
- /* @__PURE__ */ e.jsx(t, { style: D.modalTitle, children: a || r.data.name }),
942
- /* @__PURE__ */ e.jsx(h, { onPress: () => B(!1), children: /* @__PURE__ */ e.jsx(t, { style: D.closeButton, children: "✕" }) })
882
+ /* @__PURE__ */ e.jsxs(x, { style: [W.modalHeader, { borderBottomColor: o.separator }], children: [
883
+ /* @__PURE__ */ e.jsx(t, { style: [W.modalTitle, { color: o.text }], children: c || r.data.name }),
884
+ /* @__PURE__ */ e.jsx(h, { onPress: () => p(!1), children: /* @__PURE__ */ e.jsx(t, { style: [W.closeButton, { color: o.textMuted }], children: "✕" }) })
943
885
  ] }),
944
- /* @__PURE__ */ e.jsx(l, { style: D.rangeIndicator, children: /* @__PURE__ */ e.jsx(t, { style: D.rangeIndicatorText, children: u(y ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate") }) }),
945
- /* @__PURE__ */ e.jsxs(l, { style: D.calendarHeader, children: [
946
- /* @__PURE__ */ e.jsx(h, { onPress: K, style: D.navButton, children: /* @__PURE__ */ e.jsx(t, { style: D.navButtonText, children: "‹" }) }),
947
- /* @__PURE__ */ e.jsxs(t, { style: D.monthYear, children: [
948
- R[T],
886
+ /* @__PURE__ */ e.jsx(x, { style: [W.rangeIndicator, { backgroundColor: o.primaryLight }], children: /* @__PURE__ */ e.jsx(t, { style: [W.rangeIndicatorText, { color: o.primary }], children: a(l ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate") }) }),
887
+ /* @__PURE__ */ e.jsxs(x, { style: W.calendarHeader, children: [
888
+ /* @__PURE__ */ e.jsx(h, { onPress: K, style: W.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [W.navButtonText, { color: o.primary }], children: "‹" }) }),
889
+ /* @__PURE__ */ e.jsxs(t, { style: [W.monthYear, { color: o.text }], children: [
890
+ u[j],
949
891
  " ",
950
892
  b
951
893
  ] }),
952
- /* @__PURE__ */ e.jsx(h, { onPress: ee, style: D.navButton, children: /* @__PURE__ */ e.jsx(t, { style: D.navButtonText, children: "›" }) })
894
+ /* @__PURE__ */ e.jsx(h, { onPress: te, style: W.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [W.navButtonText, { color: o.primary }], children: "›" }) })
953
895
  ] }),
954
- /* @__PURE__ */ e.jsx(l, { style: D.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((F) => /* @__PURE__ */ e.jsx(t, { style: D.weekDay, children: F }, F)) }),
896
+ /* @__PURE__ */ e.jsx(x, { style: W.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((I) => /* @__PURE__ */ e.jsx(t, { style: [W.weekDay, { color: o.textMuted }], children: I }, I)) }),
955
897
  /* @__PURE__ */ e.jsx(
956
- Fe,
898
+ fe,
957
899
  {
958
- data: k,
959
- keyExtractor: (F, v) => `${F.date.getTime()}-${v}`,
900
+ data: D,
901
+ keyExtractor: (I, B) => `${I.date.getTime()}-${B}`,
960
902
  numColumns: 7,
961
903
  scrollEnabled: !1,
962
- style: D.calendar,
963
- contentContainerStyle: D.calendarContent,
964
- renderItem: ({ item: F }) => {
965
- const v = H(F.date), X = Q(F.date), O = U(F.date);
904
+ style: W.calendar,
905
+ contentContainerStyle: W.calendarContent,
906
+ renderItem: ({ item: I }) => {
907
+ const B = A(I.date), ee = Z(I.date), M = Q(I.date);
966
908
  return /* @__PURE__ */ e.jsx(
967
909
  h,
968
910
  {
969
911
  style: [
970
- D.dayCell,
971
- !F.isCurrentMonth && D.dayCellOtherMonth,
972
- X && D.dayCellInRange,
973
- O && D.dayCellSelected,
974
- v && D.dayCellDisabled
912
+ W.dayCell,
913
+ !I.isCurrentMonth && W.dayCellOtherMonth,
914
+ ee && { backgroundColor: o.primaryLight },
915
+ M && { backgroundColor: o.primary, borderRadius: 20 },
916
+ B && W.dayCellDisabled
975
917
  ],
976
- onPress: () => _(F.date),
977
- disabled: v,
918
+ onPress: () => N(I.date),
919
+ disabled: B,
978
920
  activeOpacity: 0.7,
979
921
  children: /* @__PURE__ */ e.jsx(
980
922
  t,
981
923
  {
982
924
  style: [
983
- D.dayText,
984
- !F.isCurrentMonth && D.dayTextOtherMonth,
985
- X && D.dayTextInRange,
986
- O && D.dayTextSelected,
987
- v && D.dayTextDisabled
925
+ W.dayText,
926
+ { color: o.text },
927
+ !I.isCurrentMonth && { color: o.textMuted },
928
+ ee && { color: o.primary },
929
+ M && { color: o.background, fontWeight: "600" },
930
+ B && { color: o.textMuted }
988
931
  ],
989
- children: F.day
932
+ children: I.day
990
933
  }
991
934
  )
992
935
  }
@@ -995,10 +938,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
995
938
  }
996
939
  )
997
940
  ] }) }) }),
998
- n && /* @__PURE__ */ e.jsx(t, { style: D.error, children: n }),
999
- f && !n && /* @__PURE__ */ e.jsx(t, { style: D.helperText, children: f })
941
+ n && /* @__PURE__ */ e.jsx(t, { style: [W.error, { color: o.error }], children: n }),
942
+ S && !n && /* @__PURE__ */ e.jsx(t, { style: [W.helperText, { color: o.textMuted }], children: S })
1000
943
  ] });
1001
- }, D = $.create({
944
+ }, W = _.create({
1002
945
  calendar: {
1003
946
  flexGrow: 0,
1004
947
  flexShrink: 1
@@ -1014,7 +957,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1014
957
  paddingHorizontal: 8
1015
958
  },
1016
959
  closeButton: {
1017
- color: "#6B7280",
1018
960
  fontSize: 24,
1019
961
  fontWeight: "300"
1020
962
  },
@@ -1032,40 +974,17 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1032
974
  dayCellDisabled: {
1033
975
  opacity: 0.3
1034
976
  },
1035
- dayCellInRange: {
1036
- backgroundColor: "#DBEAFE"
1037
- },
1038
977
  dayCellOtherMonth: {
1039
978
  opacity: 0.3
1040
979
  },
1041
- dayCellSelected: {
1042
- backgroundColor: "#3B82F6",
1043
- borderRadius: 20
1044
- },
1045
980
  dayText: {
1046
- color: "#374151",
1047
981
  fontSize: 14
1048
982
  },
1049
- dayTextDisabled: {
1050
- color: "#9CA3AF"
1051
- },
1052
- dayTextInRange: {
1053
- color: "#1E40AF"
1054
- },
1055
- dayTextOtherMonth: {
1056
- color: "#9CA3AF"
1057
- },
1058
- dayTextSelected: {
1059
- color: "#FFFFFF",
1060
- fontWeight: "600"
1061
- },
1062
983
  error: {
1063
- color: "#EF4444",
1064
984
  fontSize: 12,
1065
985
  marginTop: 4
1066
986
  },
1067
987
  helperText: {
1068
- color: "#6B7280",
1069
988
  fontSize: 12,
1070
989
  marginTop: 4
1071
990
  },
@@ -1073,13 +992,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1073
992
  fontSize: 16
1074
993
  },
1075
994
  label: {
1076
- color: "#374151",
1077
995
  fontSize: 14,
1078
996
  fontWeight: "500",
1079
997
  marginBottom: 8
1080
998
  },
1081
999
  modalContent: {
1082
- backgroundColor: "#FFFFFF",
1083
1000
  borderRadius: 12,
1084
1001
  maxHeight: "80%",
1085
1002
  padding: 16,
@@ -1087,7 +1004,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1087
1004
  },
1088
1005
  modalHeader: {
1089
1006
  alignItems: "center",
1090
- borderBottomColor: "#E5E7EB",
1091
1007
  borderBottomWidth: 1,
1092
1008
  flexDirection: "row",
1093
1009
  justifyContent: "space-between",
@@ -1101,12 +1017,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1101
1017
  justifyContent: "center"
1102
1018
  },
1103
1019
  modalTitle: {
1104
- color: "#111827",
1105
1020
  fontSize: 18,
1106
1021
  fontWeight: "600"
1107
1022
  },
1108
1023
  monthYear: {
1109
- color: "#111827",
1110
1024
  fontSize: 16,
1111
1025
  fontWeight: "600"
1112
1026
  },
@@ -1114,29 +1028,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1114
1028
  padding: 8
1115
1029
  },
1116
1030
  navButtonText: {
1117
- color: "#3B82F6",
1118
1031
  fontSize: 24,
1119
1032
  fontWeight: "600"
1120
1033
  },
1121
1034
  rangeIndicator: {
1122
1035
  alignItems: "center",
1123
- backgroundColor: "#EFF6FF",
1124
1036
  borderRadius: 6,
1125
1037
  marginBottom: 12,
1126
1038
  paddingVertical: 8
1127
1039
  },
1128
1040
  rangeIndicatorText: {
1129
- color: "#3B82F6",
1130
1041
  fontSize: 14,
1131
1042
  fontWeight: "600"
1132
1043
  },
1133
- required: {
1134
- color: "#EF4444"
1135
- },
1136
1044
  trigger: {
1137
1045
  alignItems: "center",
1138
- backgroundColor: "#FFFFFF",
1139
- borderColor: "#D1D5DB",
1140
1046
  borderRadius: 6,
1141
1047
  borderWidth: 1,
1142
1048
  flexDirection: "row",
@@ -1144,19 +1050,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1144
1050
  paddingHorizontal: 12,
1145
1051
  paddingVertical: 10
1146
1052
  },
1147
- triggerError: {
1148
- borderColor: "#EF4444"
1149
- },
1150
- triggerPlaceholder: {
1151
- color: "#9CA3AF"
1152
- },
1153
1053
  triggerText: {
1154
- color: "#374151",
1155
1054
  flex: 1,
1156
1055
  fontSize: 14
1157
1056
  },
1158
1057
  weekDay: {
1159
- color: "#6B7280",
1160
1058
  flex: 1,
1161
1059
  fontSize: 12,
1162
1060
  fontWeight: "600",
@@ -1167,77 +1065,83 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1167
1065
  flexDirection: "row",
1168
1066
  marginBottom: 8
1169
1067
  }
1170
- }), lt = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
1171
- const [m, B] = A(null), [y, S] = A(!0), u = ne(), x = Array.isArray(o) ? o : o ? [o] : [], i = r.data.multiple, c = he(async () => {
1172
- if (m)
1068
+ }), dt = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
1069
+ const [y, p] = R(null), [l, g] = R(!0), a = se(), { colors: o } = q(), d = Array.isArray(s) ? s : s ? [s] : [], m = r.data.multiple, C = ye(async () => {
1070
+ if (y)
1173
1071
  try {
1174
- const b = (await m({
1175
- allowMultiSelection: i
1176
- })).map((j) => ({
1177
- data: j.uri,
1072
+ const b = (await y({
1073
+ allowMultiSelection: m
1074
+ })).map((z) => ({
1075
+ data: z.uri,
1178
1076
  lastModified: Date.now(),
1179
- name: j.name,
1180
- size: j.size,
1181
- type: j.type || "application/octet-stream"
1077
+ name: z.name,
1078
+ size: z.size,
1079
+ type: z.type || "application/octet-stream"
1182
1080
  }));
1183
- s(i ? [...x, ...b] : b[0] || null);
1184
- } catch (g) {
1185
- g.code !== "DOCUMENT_PICKER_CANCELED" && Je.alert("Error", u("renderer.defaultInputs.filePickerError"));
1081
+ i(m ? [...d, ...b] : b[0] || null);
1082
+ } catch (f) {
1083
+ f.code !== "DOCUMENT_PICKER_CANCELED" && Xe.alert("Error", a("renderer.defaultInputs.filePickerError"));
1186
1084
  }
1187
- }, [m, x, i, s, u]), z = he(
1188
- (g) => {
1189
- const b = x.filter((j, T) => T !== g);
1190
- s(b.length > 0 ? b : null);
1085
+ }, [y, d, m, i, a]), v = ye(
1086
+ (f) => {
1087
+ const b = d.filter((z, j) => j !== f);
1088
+ i(b.length > 0 ? b : null);
1191
1089
  },
1192
- [x, s]
1193
- ), C = (g) => g < 1024 ? `${g} B` : g < 1024 * 1024 ? `${(g / 1024).toFixed(1)} KB` : `${(g / (1024 * 1024)).toFixed(1)} MB`;
1194
- return de(() => {
1090
+ [d, i]
1091
+ ), w = (f) => f < 1024 ? `${f} B` : f < 1024 * 1024 ? `${(f / 1024).toFixed(1)} KB` : `${(f / (1024 * 1024)).toFixed(1)} MB`;
1092
+ return ge(() => {
1195
1093
  (async () => {
1196
1094
  try {
1197
1095
  const { pick: b } = await import("react-native-document-picker");
1198
- B(() => b);
1096
+ p(() => b);
1199
1097
  } catch {
1200
- B(null);
1098
+ p(null);
1201
1099
  } finally {
1202
- S(!1);
1100
+ g(!1);
1203
1101
  }
1204
1102
  })();
1205
- }, []), y ? null : m ? /* @__PURE__ */ e.jsxs(l, { style: N.container, children: [
1206
- /* @__PURE__ */ e.jsxs(t, { style: N.label, children: [
1207
- a || r.data.name,
1208
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: N.required, children: "*" })
1103
+ }, []), l ? null : y ? /* @__PURE__ */ e.jsxs(x, { style: Y.container, children: [
1104
+ /* @__PURE__ */ e.jsxs(t, { style: [Y.label, { color: o.textSecondary }], children: [
1105
+ c || r.data.name,
1106
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
1209
1107
  ] }),
1210
- x.length > 0 && /* @__PURE__ */ e.jsx(l, { style: N.filesList, children: x.map((g, b) => /* @__PURE__ */ e.jsxs(l, { style: N.fileItem, children: [
1211
- /* @__PURE__ */ e.jsx(l, { style: N.fileIcon, children: /* @__PURE__ */ e.jsx(t, { style: N.fileIconText, children: "📄" }) }),
1212
- /* @__PURE__ */ e.jsxs(l, { style: N.fileInfo, children: [
1213
- /* @__PURE__ */ e.jsx(t, { style: N.fileName, numberOfLines: 1, children: g.name }),
1214
- g.size > 0 && /* @__PURE__ */ e.jsx(t, { style: N.fileSize, children: C(g.size) })
1108
+ d.length > 0 && /* @__PURE__ */ e.jsx(x, { style: Y.filesList, children: d.map((f, b) => /* @__PURE__ */ e.jsxs(x, { style: [Y.fileItem, { backgroundColor: o.card, borderColor: o.separator }], children: [
1109
+ /* @__PURE__ */ e.jsx(x, { style: [Y.fileIcon, { backgroundColor: o.muted }], children: /* @__PURE__ */ e.jsx(t, { style: Y.fileIconText, children: "📄" }) }),
1110
+ /* @__PURE__ */ e.jsxs(x, { style: Y.fileInfo, children: [
1111
+ /* @__PURE__ */ e.jsx(t, { style: [Y.fileName, { color: o.text }], numberOfLines: 1, children: f.name }),
1112
+ f.size > 0 && /* @__PURE__ */ e.jsx(t, { style: [Y.fileSize, { color: o.textMuted }], children: w(f.size) })
1215
1113
  ] }),
1216
- /* @__PURE__ */ e.jsx(h, { style: N.removeButton, onPress: () => z(b), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: N.removeButtonText, children: "✕" }) })
1217
- ] }, `${g.name}-${b}`)) }),
1218
- /* @__PURE__ */ e.jsx(h, { style: N.pickButton, onPress: c, activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: N.pickButtonText, children: x.length === 0 ? u(i ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : u(i ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile") }) }),
1219
- n && /* @__PURE__ */ e.jsx(t, { style: N.error, children: n }),
1220
- f && !n && /* @__PURE__ */ e.jsx(t, { style: N.helperText, children: f })
1221
- ] }) : /* @__PURE__ */ e.jsxs(l, { style: N.container, children: [
1222
- /* @__PURE__ */ e.jsxs(t, { style: N.label, children: [
1223
- a || r.data.name,
1224
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: N.required, children: "*" })
1114
+ /* @__PURE__ */ e.jsx(h, { style: Y.removeButton, onPress: () => v(b), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: [Y.removeButtonText, { color: o.textMuted }], children: "✕" }) })
1115
+ ] }, `${f.name}-${b}`)) }),
1116
+ /* @__PURE__ */ e.jsx(
1117
+ h,
1118
+ {
1119
+ style: [Y.pickButton, { backgroundColor: o.input, borderColor: o.border }],
1120
+ onPress: C,
1121
+ activeOpacity: 0.7,
1122
+ children: /* @__PURE__ */ e.jsx(t, { style: [Y.pickButtonText, { color: o.textMuted }], children: d.length === 0 ? a(m ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : a(m ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile") })
1123
+ }
1124
+ ),
1125
+ n && /* @__PURE__ */ e.jsx(t, { style: [Y.error, { color: o.error }], children: n }),
1126
+ S && !n && /* @__PURE__ */ e.jsx(t, { style: [Y.helperText, { color: o.textMuted }], children: S })
1127
+ ] }) : /* @__PURE__ */ e.jsxs(x, { style: Y.container, children: [
1128
+ /* @__PURE__ */ e.jsxs(t, { style: [Y.label, { color: o.textSecondary }], children: [
1129
+ c || r.data.name,
1130
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
1225
1131
  ] }),
1226
- /* @__PURE__ */ e.jsx(l, { style: N.unavailableContainer, children: /* @__PURE__ */ e.jsx(t, { style: N.unavailableText, children: u("renderer.defaultInputs.filePickerUnavailable") }) }),
1227
- f && /* @__PURE__ */ e.jsx(t, { style: N.helperText, children: f })
1132
+ /* @__PURE__ */ e.jsx(x, { style: [Y.unavailableContainer, { backgroundColor: o.errorLight, borderColor: o.error }], children: /* @__PURE__ */ e.jsx(t, { style: [Y.unavailableText, { color: o.error }], children: a("renderer.defaultInputs.filePickerUnavailable") }) }),
1133
+ S && /* @__PURE__ */ e.jsx(t, { style: [Y.helperText, { color: o.textMuted }], children: S })
1228
1134
  ] });
1229
- }, N = $.create({
1135
+ }, Y = _.create({
1230
1136
  container: {
1231
1137
  marginBottom: 16
1232
1138
  },
1233
1139
  error: {
1234
- color: "#EF4444",
1235
1140
  fontSize: 12,
1236
1141
  marginTop: 4
1237
1142
  },
1238
1143
  fileIcon: {
1239
1144
  alignItems: "center",
1240
- backgroundColor: "#F3F4F6",
1241
1145
  borderRadius: 6,
1242
1146
  height: 40,
1243
1147
  justifyContent: "center",
@@ -1252,8 +1156,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1252
1156
  },
1253
1157
  fileItem: {
1254
1158
  alignItems: "center",
1255
- backgroundColor: "#F9FAFB",
1256
- borderColor: "#E5E7EB",
1257
1159
  borderRadius: 6,
1258
1160
  borderWidth: 1,
1259
1161
  flexDirection: "row",
@@ -1261,12 +1163,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1261
1163
  padding: 12
1262
1164
  },
1263
1165
  fileName: {
1264
- color: "#111827",
1265
1166
  fontSize: 14,
1266
1167
  fontWeight: "500"
1267
1168
  },
1268
1169
  fileSize: {
1269
- color: "#6B7280",
1270
1170
  fontSize: 12,
1271
1171
  marginTop: 2
1272
1172
  },
@@ -1274,20 +1174,16 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1274
1174
  marginBottom: 12
1275
1175
  },
1276
1176
  helperText: {
1277
- color: "#6B7280",
1278
1177
  fontSize: 12,
1279
1178
  marginTop: 4
1280
1179
  },
1281
1180
  label: {
1282
- color: "#374151",
1283
1181
  fontSize: 14,
1284
1182
  fontWeight: "500",
1285
1183
  marginBottom: 8
1286
1184
  },
1287
1185
  pickButton: {
1288
1186
  alignItems: "center",
1289
- backgroundColor: "#FFFFFF",
1290
- borderColor: "#D1D5DB",
1291
1187
  borderRadius: 6,
1292
1188
  borderStyle: "dashed",
1293
1189
  borderWidth: 2,
@@ -1295,7 +1191,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1295
1191
  paddingVertical: 16
1296
1192
  },
1297
1193
  pickButtonText: {
1298
- color: "#6B7280",
1299
1194
  fontSize: 14,
1300
1195
  fontWeight: "500"
1301
1196
  },
@@ -1303,220 +1198,221 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1303
1198
  padding: 4
1304
1199
  },
1305
1200
  removeButtonText: {
1306
- color: "#6B7280",
1307
1201
  fontSize: 18
1308
1202
  },
1309
- required: {
1310
- color: "#EF4444"
1311
- },
1312
1203
  unavailableContainer: {
1313
1204
  alignItems: "center",
1314
- backgroundColor: "#FEF2F2",
1315
- borderColor: "#FCA5A5",
1316
1205
  borderRadius: 6,
1317
1206
  borderWidth: 1,
1318
1207
  justifyContent: "center",
1319
1208
  paddingVertical: 16
1320
1209
  },
1321
1210
  unavailableText: {
1322
- color: "#991B1B",
1323
1211
  fontSize: 12,
1324
1212
  textAlign: "center"
1325
1213
  }
1326
- }), at = (r) => null, ct = (r) => r.replace(/<[^>]*>/g, ""), dt = (r) => r.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&#x2F;/g, "/"), Re = (r, o = {}) => {
1214
+ }), ut = (r) => null, gt = (r) => r.replace(/<[^>]*>/g, ""), xt = (r) => r.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&#x2F;/g, "/"), Le = (r, s = {}) => {
1327
1215
  if (r == null || r === "")
1328
1216
  return "";
1329
- const s = String(r), n = ct(s);
1330
- return dt(n);
1331
- }, We = 100, Ee = (r, o = {}, s = 0, n = /* @__PURE__ */ new WeakSet()) => {
1332
- if (s > We)
1333
- return console.warn(`sanitizeHttpResponse: Maximum depth (${We}) exceeded.`), typeof r == "string" ? Re(r, o) : "[Max Depth Exceeded]";
1217
+ const i = String(r), n = gt(i);
1218
+ return xt(n);
1219
+ }, Fe = 100, Re = (r, s = {}, i = 0, n = /* @__PURE__ */ new WeakSet()) => {
1220
+ if (i > Fe)
1221
+ return console.warn(`sanitizeHttpResponse: Maximum depth (${Fe}) exceeded.`), typeof r == "string" ? Le(r, s) : "[Max Depth Exceeded]";
1334
1222
  if (r == null)
1335
1223
  return r;
1336
1224
  if (typeof r == "string")
1337
- return Re(r, o);
1225
+ return Le(r, s);
1338
1226
  if (Array.isArray(r))
1339
- return r.map((a) => Ee(a, o, s + 1, n));
1227
+ return r.map((c) => Re(c, s, i + 1, n));
1340
1228
  if (typeof r == "object") {
1341
1229
  if (n.has(r))
1342
1230
  return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
1343
1231
  n.add(r);
1344
- const a = {};
1345
- for (const [f, m] of Object.entries(r))
1346
- a[f] = Ee(m, o, s + 1, n);
1347
- return n.delete(r), a;
1232
+ const c = {};
1233
+ for (const [S, y] of Object.entries(r))
1234
+ c[S] = Re(y, s, i + 1, n);
1235
+ return n.delete(r), c;
1348
1236
  }
1349
1237
  return r;
1350
- }, ke = (r, o) => o ? o.split(".").reduce((n, a) => {
1238
+ }, Be = (r, s) => s ? s.split(".").reduce((n, c) => {
1351
1239
  if (n == null)
1352
1240
  return;
1353
- const f = a.match(/^(\w+)\[(\d+)]$/);
1354
- if (f) {
1355
- const [, m, B] = f, y = n[m];
1356
- return Array.isArray(y) ? y[Number.parseInt(B, 10)] : y;
1241
+ const S = c.match(/^(\w+)\[(\d+)]$/);
1242
+ if (S) {
1243
+ const [, y, p] = S, l = n[y];
1244
+ return Array.isArray(l) ? l[Number.parseInt(p, 10)] : l;
1357
1245
  }
1358
- return n[a];
1359
- }, r) : r, Oe = (r) => {
1360
- const o = r.matchAll(/{{([\w-]+)}}/g);
1361
- return Array.from(o, (s) => s[1]);
1362
- }, ze = (r, o) => Oe(r).every((n) => {
1363
- const a = o[n];
1364
- return a != null && a !== "";
1365
- }), we = (r, o, s = !1) => r.replace(/{{([\w-]+)}}/g, (n, a) => {
1366
- const f = o[a], m = f == null ? "" : String(f);
1367
- return s ? encodeURIComponent(m) : m;
1368
- }), ut = ({
1246
+ return n[c];
1247
+ }, r) : r, Pe = (r) => {
1248
+ const s = r.matchAll(/{{([\w-]+)}}/g);
1249
+ return Array.from(s, (i) => i[1]);
1250
+ }, Me = (r, s) => Pe(r).every((n) => {
1251
+ const c = s[n];
1252
+ return c != null && c !== "";
1253
+ }), Oe = (r, s, i = !1) => r.replace(/{{([\w-]+)}}/g, (n, c) => {
1254
+ const S = s[c], y = S == null ? "" : String(S);
1255
+ return i ? encodeURIComponent(y) : y;
1256
+ }), mt = ({
1369
1257
  node: r,
1370
- value: o,
1371
- setValue: s,
1258
+ value: s,
1259
+ setValue: i,
1372
1260
  error: n,
1373
- label: a,
1374
- placeholder: f,
1375
- helperText: m,
1376
- id: B,
1377
- name: y
1261
+ label: c,
1262
+ placeholder: S,
1263
+ helperText: y,
1264
+ id: p,
1265
+ name: l
1378
1266
  }) => {
1379
- const [S, u] = A(!1), [x, i] = A(null), [c, z] = A([]), [C, g] = A(""), [b, j] = A(!1), { formValues: T, inputNodes: q } = He(), R = ne(), { httpConfig: k } = r.data, _ = le(!1), K = le(""), ee = le(k), p = le(T), H = le(q), Q = le(s), U = le(null), F = le(null), v = ue(() => k?.url ? Oe(k.url) : [], [k?.url]), X = v.length > 0, O = ue(() => v.map((Y) => `${Y}:${String(T[Y] ?? "")}`).join("|"), [v, T]), ce = ue(() => k?.url ? X ? ze(k.url, T) : !0 : !1, [k?.url, X, T]), V = he(
1380
- async (Y) => {
1381
- F.current && F.current.abort();
1382
- const re = new AbortController();
1383
- F.current = re;
1384
- const L = ee.current, se = p.current, Ce = Q.current;
1385
- if (!L?.url) {
1386
- i(R("renderer.defaultHttpInput.noUrlConfigured")), F.current = null;
1267
+ const [g, a] = R(!1), [o, d] = R(null), [m, C] = R([]), [v, w] = R(""), [f, b] = R(!1), { formValues: z, inputNodes: j } = Ve(), P = se(), { colors: u } = q(), { httpConfig: D } = r.data, N = ie(!1), K = ie(""), te = ie(D), T = ie(z), A = ie(j), Z = ie(i), Q = ie(null), I = ie(null), B = xe(() => D?.url ? Pe(D.url) : [], [D?.url]), ee = B.length > 0, M = xe(() => B.map((G) => `${G}:${String(z[G] ?? "")}`).join("|"), [B, z]), ce = xe(() => D?.url ? ee ? Me(D.url, z) : !0 : !1, [D?.url, ee, z]), $ = ye(
1268
+ async (G) => {
1269
+ I.current && I.current.abort();
1270
+ const oe = new AbortController();
1271
+ I.current = oe;
1272
+ const V = te.current, le = T.current, je = Z.current;
1273
+ if (!V?.url) {
1274
+ d(P("renderer.defaultHttpInput.noUrlConfigured")), I.current = null;
1387
1275
  return;
1388
1276
  }
1389
- if (L.url && !ze(L.url, se)) {
1390
- F.current = null;
1277
+ if (V.url && !Me(V.url, le)) {
1278
+ I.current = null;
1391
1279
  return;
1392
1280
  }
1393
- u(!0), i(null);
1281
+ a(!0), d(null);
1394
1282
  try {
1395
- const te = we(L.url, se, !0), G = L.searchParam && Y ? `${te}${te.includes("?") ? "&" : "?"}${L.searchParam}=${encodeURIComponent(Y)}` : te, J = {};
1396
- L.headers?.forEach((De) => {
1397
- J[De.key] = we(De.value, se);
1283
+ const re = Oe(V.url, le, !0), U = V.searchParam && G ? `${re}${re.includes("?") ? "&" : "?"}${V.searchParam}=${encodeURIComponent(G)}` : re, X = {};
1284
+ V.headers?.forEach((ve) => {
1285
+ X[ve.key] = Oe(ve.value, le);
1398
1286
  });
1399
- const Te = ["POST", "PUT", "PATCH"].includes(L.method || "") ? L.sendAllFormValues ? JSON.stringify($e(se, H.current)) : L.body ? we(L.body, se) : void 0 : void 0, Me = setTimeout(() => re.abort(), 3e4), Be = await fetch(G, {
1400
- body: Te || void 0,
1287
+ const ze = ["POST", "PUT", "PATCH"].includes(V.method || "") ? V.sendAllFormValues ? JSON.stringify(Ye(le, A.current)) : V.body ? Oe(V.body, le) : void 0 : void 0, $e = setTimeout(() => oe.abort(), 3e4), we = await fetch(U, {
1288
+ body: ze || void 0,
1401
1289
  headers: {
1402
1290
  "Content-Type": "application/json",
1403
- ...J
1291
+ ...X
1404
1292
  },
1405
- method: L.method || "GET",
1406
- signal: re.signal
1293
+ method: V.method || "GET",
1294
+ signal: oe.signal
1407
1295
  });
1408
- if (clearTimeout(Me), !Be.ok) {
1409
- i(`HTTP Error ${Be.status}: ${Be.statusText}`), u(!1);
1296
+ if (clearTimeout($e), !we.ok) {
1297
+ d(`HTTP Error ${we.status}: ${we.statusText}`), a(!1);
1410
1298
  return;
1411
1299
  }
1412
- const qe = await Be.json(), Ae = Ee(qe), Se = L.responsePath ? ke(Ae, L.responsePath) : Ae;
1413
- if (L.responseMapping && Array.isArray(Se)) {
1414
- const { valueField: De = "value", labelField: Ve = "label" } = L.responseMapping, Ne = Se.map((Pe) => ({
1415
- label: String(ke(Pe, Ve) || ""),
1416
- value: String(ke(Pe, De) || "")
1300
+ const Ee = await we.json(), We = Re(Ee), Ce = V.responsePath ? Be(We, V.responsePath) : We;
1301
+ if (V.responseMapping && Array.isArray(Ce)) {
1302
+ const { valueField: ve = "value", labelField: qe = "label" } = V.responseMapping, _e = Ce.map((He) => ({
1303
+ label: String(Be(He, qe) || ""),
1304
+ value: String(Be(He, ve) || "")
1417
1305
  }));
1418
- z(Ne);
1306
+ C(_e);
1419
1307
  } else
1420
- Ce(typeof Se == "string" ? Se : JSON.stringify(Se));
1421
- } catch (te) {
1422
- if (te instanceof Error && te.name === "AbortError")
1308
+ je(typeof Ce == "string" ? Ce : JSON.stringify(Ce));
1309
+ } catch (re) {
1310
+ if (re instanceof Error && re.name === "AbortError")
1423
1311
  return;
1424
- const G = te instanceof Error ? te.message : R("renderer.defaultHttpInput.fetchFailed");
1425
- i(G), console.error("HTTP Input fetch error:", te);
1312
+ const U = re instanceof Error ? re.message : P("renderer.defaultHttpInput.fetchFailed");
1313
+ d(U), console.error("HTTP Input fetch error:", re);
1426
1314
  } finally {
1427
- u(!1), F.current = null;
1315
+ a(!1), I.current = null;
1428
1316
  }
1429
1317
  },
1430
- [R]
1318
+ [P]
1431
1319
  );
1432
- if (de(() => {
1433
- ee.current = k, p.current = T, H.current = q, Q.current = s, U.current = V;
1434
- }, [k, T, q, s, V]), de(() => () => {
1435
- F.current && F.current.abort();
1436
- }, []), de(() => {
1437
- if (_.current)
1320
+ if (ge(() => {
1321
+ te.current = D, T.current = z, A.current = j, Z.current = i, Q.current = $;
1322
+ }, [D, z, j, i, $]), ge(() => () => {
1323
+ I.current && I.current.abort();
1324
+ }, []), ge(() => {
1325
+ if (N.current)
1438
1326
  return;
1439
- _.current = !0;
1440
- const Y = ee.current, re = p.current, L = U.current, se = Y?.url && ze(Y.url, re);
1441
- if (Y?.fetchOnMount && se && L && (L(), Y.url)) {
1442
- const Ce = Oe(Y.url);
1443
- K.current = Ce.map((te) => `${te}:${String(re[te] ?? "")}`).join("|");
1327
+ N.current = !0;
1328
+ const G = te.current, oe = T.current, V = Q.current, le = G?.url && Me(G.url, oe);
1329
+ if (G?.fetchOnMount && le && V && (V(), G.url)) {
1330
+ const je = Pe(G.url);
1331
+ K.current = je.map((re) => `${re}:${String(oe[re] ?? "")}`).join("|");
1444
1332
  }
1445
- }, []), de(() => {
1446
- if (!_.current || !X || K.current === O || !ce)
1333
+ }, []), ge(() => {
1334
+ if (!N.current || !ee || K.current === M || !ce)
1447
1335
  return;
1448
- const Y = setTimeout(() => {
1449
- V(), K.current = O;
1336
+ const G = setTimeout(() => {
1337
+ $(), K.current = M;
1450
1338
  }, 500);
1451
- return () => clearTimeout(Y);
1452
- }, [O, X, ce, V]), de(() => {
1453
- if (!(k?.searchParam && C))
1339
+ return () => clearTimeout(G);
1340
+ }, [M, ee, ce, $]), ge(() => {
1341
+ if (!(D?.searchParam && v))
1454
1342
  return;
1455
- const Y = setTimeout(() => {
1456
- V(C);
1343
+ const G = setTimeout(() => {
1344
+ $(v);
1457
1345
  }, 300);
1458
- return () => clearTimeout(Y);
1459
- }, [C, k?.searchParam, V]), k?.responseMapping) {
1460
- const Y = Array.isArray(o) ? o[0] : o, re = c.find((G) => G.value === Y);
1461
- if (k.searchParam) {
1462
- const G = S && k?.showLoading;
1463
- return /* @__PURE__ */ e.jsxs(l, { style: d.container, children: [
1464
- /* @__PURE__ */ e.jsxs(t, { style: d.label, children: [
1465
- a || r.data.name,
1466
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: d.required, children: "*" })
1346
+ return () => clearTimeout(G);
1347
+ }, [v, D?.searchParam, $]), D?.responseMapping) {
1348
+ const G = Array.isArray(s) ? s[0] : s, oe = m.find((U) => U.value === G);
1349
+ if (D.searchParam) {
1350
+ const U = g && D?.showLoading;
1351
+ return /* @__PURE__ */ e.jsxs(x, { style: k.container, children: [
1352
+ /* @__PURE__ */ e.jsxs(t, { style: [k.label, { color: u.textSecondary }], children: [
1353
+ c || r.data.name,
1354
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: u.error }, children: "*" })
1467
1355
  ] }),
1468
- /* @__PURE__ */ e.jsxs(h, { style: [d.trigger, n && d.triggerError], onPress: () => j(!0), activeOpacity: 0.7, children: [
1469
- G ? /* @__PURE__ */ e.jsxs(l, { style: d.loadingTrigger, children: [
1470
- /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6" }),
1471
- /* @__PURE__ */ e.jsx(t, { style: d.triggerPlaceholder, numberOfLines: 1, children: re?.label || f || R("renderer.defaultHttpInput.search") })
1472
- ] }) : /* @__PURE__ */ e.jsx(t, { style: [d.triggerText, !re && d.triggerPlaceholder], numberOfLines: 1, children: re?.label || f || R("renderer.defaultHttpInput.search") }),
1473
- /* @__PURE__ */ e.jsx(t, { style: d.arrow, children: "▼" })
1474
- ] }),
1475
- /* @__PURE__ */ e.jsx(ae, { visible: b, transparent: !0, animationType: "fade", onRequestClose: () => j(!1), children: /* @__PURE__ */ e.jsx(h, { style: d.modalOverlay, activeOpacity: 1, onPress: () => j(!1), children: /* @__PURE__ */ e.jsxs(h, { style: d.modalContent, activeOpacity: 1, onPress: () => {
1356
+ /* @__PURE__ */ e.jsxs(
1357
+ h,
1358
+ {
1359
+ style: [k.trigger, { backgroundColor: u.input, borderColor: u.border }, n && { borderColor: u.error }],
1360
+ onPress: () => b(!0),
1361
+ activeOpacity: 0.7,
1362
+ children: [
1363
+ U ? /* @__PURE__ */ e.jsxs(x, { style: k.loadingTrigger, children: [
1364
+ /* @__PURE__ */ e.jsx(he, { size: "small", color: u.primary }),
1365
+ /* @__PURE__ */ e.jsx(t, { style: [k.triggerText, { color: u.textMuted }], numberOfLines: 1, children: oe?.label || S || P("renderer.defaultHttpInput.search") })
1366
+ ] }) : /* @__PURE__ */ e.jsx(t, { style: [k.triggerText, { color: u.text }, !oe && { color: u.textMuted }], numberOfLines: 1, children: oe?.label || S || P("renderer.defaultHttpInput.search") }),
1367
+ /* @__PURE__ */ e.jsx(t, { style: [k.arrow, { color: u.textMuted }], children: "▼" })
1368
+ ]
1369
+ }
1370
+ ),
1371
+ /* @__PURE__ */ e.jsx(ae, { visible: f, transparent: !0, animationType: "fade", onRequestClose: () => b(!1), children: /* @__PURE__ */ e.jsx(h, { style: k.modalOverlay, activeOpacity: 1, onPress: () => b(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [k.modalContent, { backgroundColor: u.card }], activeOpacity: 1, onPress: () => {
1476
1372
  }, children: [
1477
- /* @__PURE__ */ e.jsxs(l, { style: d.modalHeader, children: [
1478
- /* @__PURE__ */ e.jsx(t, { style: d.modalTitle, children: a || r.data.name }),
1479
- /* @__PURE__ */ e.jsx(h, { onPress: () => j(!1), children: /* @__PURE__ */ e.jsx(t, { style: d.closeButton, children: "✕" }) })
1373
+ /* @__PURE__ */ e.jsxs(x, { style: [k.modalHeader, { borderBottomColor: u.separator }], children: [
1374
+ /* @__PURE__ */ e.jsx(t, { style: [k.modalTitle, { color: u.text }], children: c || r.data.name }),
1375
+ /* @__PURE__ */ e.jsx(h, { onPress: () => b(!1), children: /* @__PURE__ */ e.jsx(t, { style: [k.closeButton, { color: u.textMuted }], children: "✕" }) })
1480
1376
  ] }),
1481
- /* @__PURE__ */ e.jsx(l, { style: d.searchContainer, children: /* @__PURE__ */ e.jsx(
1482
- ge,
1377
+ /* @__PURE__ */ e.jsx(x, { style: k.searchContainer, children: /* @__PURE__ */ e.jsx(
1378
+ me,
1483
1379
  {
1484
- style: d.searchInput,
1485
- placeholder: R("renderer.defaultHttpInput.search"),
1486
- placeholderTextColor: "#9CA3AF",
1487
- value: C,
1488
- onChangeText: (J) => {
1489
- g(J), i(null);
1380
+ style: [k.searchInput, { backgroundColor: u.muted, borderColor: u.border, color: u.text }],
1381
+ placeholder: P("renderer.defaultHttpInput.search"),
1382
+ placeholderTextColor: u.textMuted,
1383
+ value: v,
1384
+ onChangeText: (X) => {
1385
+ w(X), d(null);
1490
1386
  },
1491
1387
  autoFocus: !0,
1492
1388
  autoCapitalize: "none",
1493
1389
  autoCorrect: !1
1494
1390
  }
1495
1391
  ) }),
1496
- S ? /* @__PURE__ */ e.jsx(l, { style: d.loadingContainer, children: /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6" }) }) : x ? /* @__PURE__ */ e.jsxs(l, { style: d.errorContainer, children: [
1497
- /* @__PURE__ */ e.jsx(t, { style: d.errorText, children: x }),
1498
- /* @__PURE__ */ e.jsx(h, { onPress: () => V(C), style: d.retryButton, children: /* @__PURE__ */ e.jsx(t, { style: d.retryButtonText, children: R("renderer.defaultHttpInput.retry") }) })
1392
+ g ? /* @__PURE__ */ e.jsx(x, { style: k.loadingContainer, children: /* @__PURE__ */ e.jsx(he, { size: "small", color: u.primary }) }) : o ? /* @__PURE__ */ e.jsxs(x, { style: k.errorContainer, children: [
1393
+ /* @__PURE__ */ e.jsx(t, { style: [k.errorText, { color: u.error }], children: o }),
1394
+ /* @__PURE__ */ e.jsx(h, { onPress: () => $(v), style: k.retryButton, children: /* @__PURE__ */ e.jsx(t, { style: [k.retryButtonText, { color: u.primary }], children: P("renderer.defaultHttpInput.retry") }) })
1499
1395
  ] }) : /* @__PURE__ */ e.jsx(
1500
- Fe,
1396
+ fe,
1501
1397
  {
1502
- data: c,
1503
- keyExtractor: (J) => J.value,
1504
- style: d.optionsList,
1505
- contentContainerStyle: d.optionsListContent,
1506
- ListEmptyComponent: /* @__PURE__ */ e.jsx(l, { style: d.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: d.emptyText, children: R("renderer.defaultHttpInput.noResults") }) }),
1507
- renderItem: ({ item: J }) => {
1508
- const Te = J.value === Y;
1398
+ data: m,
1399
+ keyExtractor: (X) => X.value,
1400
+ style: k.optionsList,
1401
+ contentContainerStyle: k.optionsListContent,
1402
+ ListEmptyComponent: /* @__PURE__ */ e.jsx(x, { style: k.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [k.emptyText, { color: u.textMuted }], children: P("renderer.defaultHttpInput.noResults") }) }),
1403
+ renderItem: ({ item: X }) => {
1404
+ const ze = X.value === G;
1509
1405
  return /* @__PURE__ */ e.jsxs(
1510
1406
  h,
1511
1407
  {
1512
- style: [d.option, Te && d.optionSelected],
1408
+ style: [k.option, ze && { backgroundColor: u.primaryLight }],
1513
1409
  onPress: () => {
1514
- s(J.value), j(!1);
1410
+ i(X.value), b(!1);
1515
1411
  },
1516
1412
  activeOpacity: 0.7,
1517
1413
  children: [
1518
- /* @__PURE__ */ e.jsx(t, { style: d.optionText, children: J.label }),
1519
- Te && /* @__PURE__ */ e.jsx(t, { style: d.checkmark, children: "✓" })
1414
+ /* @__PURE__ */ e.jsx(t, { style: [k.optionText, { color: u.text }], children: X.label }),
1415
+ ze && /* @__PURE__ */ e.jsx(t, { style: [k.checkmark, { color: u.primary }], children: "✓" })
1520
1416
  ]
1521
1417
  }
1522
1418
  );
@@ -1524,60 +1420,65 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1524
1420
  }
1525
1421
  )
1526
1422
  ] }) }) }),
1527
- n && /* @__PURE__ */ e.jsx(t, { style: d.error, children: n }),
1528
- m && !n && /* @__PURE__ */ e.jsx(t, { style: d.helperText, children: m })
1423
+ n && /* @__PURE__ */ e.jsx(t, { style: [k.error, { color: u.error }], children: n }),
1424
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [k.helperText, { color: u.textMuted }], children: y })
1529
1425
  ] });
1530
1426
  }
1531
- const L = S && k?.showLoading, se = v.filter((G) => {
1532
- const J = T[G];
1533
- return J == null || J === "";
1534
- }), Ce = se.map((G) => _e(G, q) || G), te = c.length === 0 && !L ? x || (se.length > 0 ? `${R("renderer.defaultHttpInput.waitingForRequiredFields")}: ${Ce.join(", ")}` : R("renderer.defaultHttpInput.noDataAvailable")) : void 0;
1535
- return /* @__PURE__ */ e.jsxs(l, { style: d.container, children: [
1536
- /* @__PURE__ */ e.jsxs(t, { style: d.label, children: [
1537
- a || r.data.name,
1538
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: d.required, children: "*" })
1427
+ const V = g && D?.showLoading, le = B.filter((U) => {
1428
+ const X = z[U];
1429
+ return X == null || X === "";
1430
+ }), je = le.map((U) => Ge(U, j) || U), re = m.length === 0 && !V ? o || (le.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${je.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0;
1431
+ return /* @__PURE__ */ e.jsxs(x, { style: k.container, children: [
1432
+ /* @__PURE__ */ e.jsxs(t, { style: [k.label, { color: u.textSecondary }], children: [
1433
+ c || r.data.name,
1434
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: u.error }, children: "*" })
1539
1435
  ] }),
1540
1436
  /* @__PURE__ */ e.jsxs(
1541
1437
  h,
1542
1438
  {
1543
- style: [d.trigger, n && d.triggerError, (L || c.length === 0) && d.triggerDisabled],
1544
- onPress: () => j(!0),
1545
- disabled: L || c.length === 0,
1439
+ style: [
1440
+ k.trigger,
1441
+ { backgroundColor: u.input, borderColor: u.border },
1442
+ n && { borderColor: u.error },
1443
+ (V || m.length === 0) && { backgroundColor: u.muted }
1444
+ ],
1445
+ onPress: () => b(!0),
1446
+ disabled: V || m.length === 0,
1546
1447
  activeOpacity: 0.7,
1547
1448
  children: [
1548
- L && /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6", style: d.triggerLoader }),
1549
- /* @__PURE__ */ e.jsx(t, { style: [d.triggerText, !re && d.triggerPlaceholder], numberOfLines: 1, children: re?.label || f || R("renderer.defaultHttpInput.selectOption") }),
1550
- /* @__PURE__ */ e.jsx(t, { style: d.arrow, children: "▼" })
1449
+ V && /* @__PURE__ */ e.jsx(he, { size: "small", color: u.primary, style: k.triggerLoader }),
1450
+ /* @__PURE__ */ e.jsx(t, { style: [k.triggerText, { color: u.text }, !oe && { color: u.textMuted }], numberOfLines: 1, children: oe?.label || S || P("renderer.defaultHttpInput.selectOption") }),
1451
+ /* @__PURE__ */ e.jsx(t, { style: [k.arrow, { color: u.textMuted }], children: "▼" })
1551
1452
  ]
1552
1453
  }
1553
1454
  ),
1554
- te && /* @__PURE__ */ e.jsx(t, { style: d.disabledMessage, children: te }),
1555
- /* @__PURE__ */ e.jsx(ae, { visible: b, transparent: !0, animationType: "fade", onRequestClose: () => j(!1), children: /* @__PURE__ */ e.jsx(h, { style: d.modalOverlay, activeOpacity: 1, onPress: () => j(!1), children: /* @__PURE__ */ e.jsxs(h, { style: d.modalContent, activeOpacity: 1, onPress: () => {
1455
+ re && /* @__PURE__ */ e.jsx(t, { style: [k.disabledMessage, { color: u.error }], children: re }),
1456
+ /* @__PURE__ */ e.jsx(ae, { visible: f, transparent: !0, animationType: "fade", onRequestClose: () => b(!1), children: /* @__PURE__ */ e.jsx(h, { style: k.modalOverlay, activeOpacity: 1, onPress: () => b(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [k.modalContent, { backgroundColor: u.card }], activeOpacity: 1, onPress: () => {
1556
1457
  }, children: [
1557
- /* @__PURE__ */ e.jsxs(l, { style: d.modalHeader, children: [
1558
- /* @__PURE__ */ e.jsx(t, { style: d.modalTitle, children: a || r.data.name }),
1559
- /* @__PURE__ */ e.jsx(h, { onPress: () => j(!1), children: /* @__PURE__ */ e.jsx(t, { style: d.closeButton, children: "✕" }) })
1458
+ /* @__PURE__ */ e.jsxs(x, { style: [k.modalHeader, { borderBottomColor: u.separator }], children: [
1459
+ /* @__PURE__ */ e.jsx(t, { style: [k.modalTitle, { color: u.text }], children: c || r.data.name }),
1460
+ /* @__PURE__ */ e.jsx(h, { onPress: () => b(!1), children: /* @__PURE__ */ e.jsx(t, { style: [k.closeButton, { color: u.textMuted }], children: "✕" }) })
1560
1461
  ] }),
1561
1462
  /* @__PURE__ */ e.jsx(
1562
- Fe,
1463
+ fe,
1563
1464
  {
1564
- data: c,
1565
- keyExtractor: (G) => G.value,
1566
- style: d.optionsList,
1567
- contentContainerStyle: d.optionsListContent,
1568
- renderItem: ({ item: G }) => {
1569
- const J = G.value === Y;
1465
+ data: m,
1466
+ keyExtractor: (U) => U.value,
1467
+ style: k.optionsList,
1468
+ contentContainerStyle: k.optionsListContent,
1469
+ renderItem: ({ item: U }) => {
1470
+ const X = U.value === G;
1570
1471
  return /* @__PURE__ */ e.jsxs(
1571
1472
  h,
1572
1473
  {
1573
- style: [d.option, J && d.optionSelected],
1474
+ style: [k.option, X && { backgroundColor: u.primaryLight }],
1574
1475
  onPress: () => {
1575
- s(G.value), j(!1);
1476
+ i(U.value), b(!1);
1576
1477
  },
1577
1478
  activeOpacity: 0.7,
1578
1479
  children: [
1579
- /* @__PURE__ */ e.jsx(t, { style: d.optionText, children: G.label }),
1580
- J && /* @__PURE__ */ e.jsx(t, { style: d.checkmark, children: "✓" })
1480
+ /* @__PURE__ */ e.jsx(t, { style: [k.optionText, { color: u.text }], children: U.label }),
1481
+ X && /* @__PURE__ */ e.jsx(t, { style: [k.checkmark, { color: u.primary }], children: "✓" })
1581
1482
  ]
1582
1483
  }
1583
1484
  );
@@ -1585,38 +1486,35 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1585
1486
  }
1586
1487
  )
1587
1488
  ] }) }) }),
1588
- n && /* @__PURE__ */ e.jsx(t, { style: d.error, children: n }),
1589
- m && !n && /* @__PURE__ */ e.jsx(t, { style: d.helperText, children: m })
1489
+ n && /* @__PURE__ */ e.jsx(t, { style: [k.error, { color: u.error }], children: n }),
1490
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [k.helperText, { color: u.textMuted }], children: y })
1590
1491
  ] });
1591
1492
  }
1592
- return /* @__PURE__ */ e.jsxs(l, { style: d.container, children: [
1593
- /* @__PURE__ */ e.jsxs(t, { style: d.label, children: [
1594
- a || r.data.name,
1595
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: d.required, children: "*" })
1493
+ return /* @__PURE__ */ e.jsxs(x, { style: k.container, children: [
1494
+ /* @__PURE__ */ e.jsxs(t, { style: [k.label, { color: u.textSecondary }], children: [
1495
+ c || r.data.name,
1496
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: u.error }, children: "*" })
1596
1497
  ] }),
1597
1498
  /* @__PURE__ */ e.jsx(
1598
- ge,
1499
+ me,
1599
1500
  {
1600
- style: [d.input, d.inputDisabled],
1601
- value: typeof o == "string" ? o : JSON.stringify(o),
1501
+ style: [k.input, { backgroundColor: u.muted, borderColor: u.border, color: u.textMuted }],
1502
+ value: typeof s == "string" ? s : JSON.stringify(s),
1602
1503
  editable: !1
1603
1504
  }
1604
1505
  ),
1605
- n && /* @__PURE__ */ e.jsx(t, { style: d.error, children: n }),
1606
- m && !n && /* @__PURE__ */ e.jsx(t, { style: d.helperText, children: m })
1506
+ n && /* @__PURE__ */ e.jsx(t, { style: [k.error, { color: u.error }], children: n }),
1507
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [k.helperText, { color: u.textMuted }], children: y })
1607
1508
  ] });
1608
- }, d = $.create({
1509
+ }, k = _.create({
1609
1510
  arrow: {
1610
- color: "#6B7280",
1611
1511
  fontSize: 12
1612
1512
  },
1613
1513
  checkmark: {
1614
- color: "#3B82F6",
1615
1514
  fontSize: 18,
1616
1515
  fontWeight: "700"
1617
1516
  },
1618
1517
  closeButton: {
1619
- color: "#6B7280",
1620
1518
  fontSize: 24,
1621
1519
  fontWeight: "300"
1622
1520
  },
@@ -1624,7 +1522,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1624
1522
  marginBottom: 16
1625
1523
  },
1626
1524
  disabledMessage: {
1627
- color: "#EF4444",
1628
1525
  fontSize: 12,
1629
1526
  marginTop: 4
1630
1527
  },
@@ -1633,11 +1530,9 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1633
1530
  paddingVertical: 24
1634
1531
  },
1635
1532
  emptyText: {
1636
- color: "#9CA3AF",
1637
1533
  fontSize: 14
1638
1534
  },
1639
1535
  error: {
1640
- color: "#EF4444",
1641
1536
  fontSize: 12,
1642
1537
  marginTop: 4
1643
1538
  },
@@ -1646,31 +1541,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1646
1541
  paddingVertical: 16
1647
1542
  },
1648
1543
  errorText: {
1649
- color: "#EF4444",
1650
1544
  fontSize: 14,
1651
1545
  textAlign: "center"
1652
1546
  },
1653
1547
  helperText: {
1654
- color: "#6B7280",
1655
1548
  fontSize: 12,
1656
1549
  marginTop: 4
1657
1550
  },
1658
1551
  input: {
1659
- backgroundColor: "#FFFFFF",
1660
- borderColor: "#D1D5DB",
1661
1552
  borderRadius: 6,
1662
1553
  borderWidth: 1,
1663
- color: "#374151",
1664
1554
  fontSize: 14,
1665
1555
  paddingHorizontal: 12,
1666
1556
  paddingVertical: 10
1667
1557
  },
1668
- inputDisabled: {
1669
- backgroundColor: "#F9FAFB",
1670
- color: "#9CA3AF"
1671
- },
1672
1558
  label: {
1673
- color: "#374151",
1674
1559
  fontSize: 14,
1675
1560
  fontWeight: "500",
1676
1561
  marginBottom: 8
@@ -1686,7 +1571,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1686
1571
  gap: 8
1687
1572
  },
1688
1573
  modalContent: {
1689
- backgroundColor: "#FFFFFF",
1690
1574
  borderRadius: 12,
1691
1575
  maxHeight: "80%",
1692
1576
  padding: 16,
@@ -1694,7 +1578,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1694
1578
  },
1695
1579
  modalHeader: {
1696
1580
  alignItems: "center",
1697
- borderBottomColor: "#E5E7EB",
1698
1581
  borderBottomWidth: 1,
1699
1582
  flexDirection: "row",
1700
1583
  justifyContent: "space-between",
@@ -1708,7 +1591,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1708
1591
  justifyContent: "center"
1709
1592
  },
1710
1593
  modalTitle: {
1711
- color: "#111827",
1712
1594
  fontSize: 18,
1713
1595
  fontWeight: "600"
1714
1596
  },
@@ -1720,9 +1602,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1720
1602
  paddingHorizontal: 12,
1721
1603
  paddingVertical: 12
1722
1604
  },
1723
- optionSelected: {
1724
- backgroundColor: "#EFF6FF"
1725
- },
1726
1605
  optionsList: {
1727
1606
  flexGrow: 0,
1728
1607
  flexShrink: 1
@@ -1731,18 +1610,13 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1731
1610
  flexGrow: 0
1732
1611
  },
1733
1612
  optionText: {
1734
- color: "#374151",
1735
1613
  flex: 1,
1736
1614
  fontSize: 14
1737
1615
  },
1738
- required: {
1739
- color: "#EF4444"
1740
- },
1741
1616
  retryButton: {
1742
1617
  marginTop: 12
1743
1618
  },
1744
1619
  retryButtonText: {
1745
- color: "#3B82F6",
1746
1620
  fontSize: 14,
1747
1621
  textDecorationLine: "underline"
1748
1622
  },
@@ -1750,19 +1624,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1750
1624
  marginBottom: 12
1751
1625
  },
1752
1626
  searchInput: {
1753
- backgroundColor: "#F9FAFB",
1754
- borderColor: "#D1D5DB",
1755
1627
  borderRadius: 6,
1756
1628
  borderWidth: 1,
1757
- color: "#374151",
1758
1629
  fontSize: 14,
1759
1630
  paddingHorizontal: 12,
1760
1631
  paddingVertical: 10
1761
1632
  },
1762
1633
  trigger: {
1763
1634
  alignItems: "center",
1764
- backgroundColor: "#FFFFFF",
1765
- borderColor: "#D1D5DB",
1766
1635
  borderRadius: 6,
1767
1636
  borderWidth: 1,
1768
1637
  flexDirection: "row",
@@ -1770,129 +1639,114 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1770
1639
  paddingHorizontal: 12,
1771
1640
  paddingVertical: 10
1772
1641
  },
1773
- triggerDisabled: {
1774
- backgroundColor: "#F9FAFB"
1775
- },
1776
- triggerError: {
1777
- borderColor: "#EF4444"
1778
- },
1779
1642
  triggerLoader: {
1780
1643
  marginRight: 8
1781
1644
  },
1782
- triggerPlaceholder: {
1783
- color: "#9CA3AF"
1784
- },
1785
1645
  triggerText: {
1786
- color: "#374151",
1787
1646
  flex: 1,
1788
1647
  fontSize: 14
1789
1648
  }
1790
- }), gt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => {
1791
- const [y, S] = A(o?.toString() ?? "");
1792
- return de(() => {
1793
- S(o?.toString() ?? "");
1794
- }, [o]), /* @__PURE__ */ e.jsxs(l, { style: me.container, children: [
1795
- /* @__PURE__ */ e.jsxs(t, { style: me.label, children: [
1796
- a || r.data.name,
1797
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: me.required, children: "*" })
1649
+ }), yt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
1650
+ const { colors: l } = q(), [g, a] = R(s?.toString() ?? "");
1651
+ return ge(() => {
1652
+ a(s?.toString() ?? "");
1653
+ }, [s]), /* @__PURE__ */ e.jsxs(x, { style: Se.container, children: [
1654
+ /* @__PURE__ */ e.jsxs(t, { style: [Se.label, { color: l.textSecondary }], children: [
1655
+ c || r.data.name,
1656
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
1798
1657
  ] }),
1799
1658
  /* @__PURE__ */ e.jsx(
1800
- ge,
1659
+ me,
1801
1660
  {
1802
- style: [me.input, n && me.inputError],
1803
- value: y,
1804
- onChangeText: (u) => {
1805
- if (S(u), u.trim() === "") {
1806
- s(null);
1661
+ style: [
1662
+ Se.input,
1663
+ { backgroundColor: l.input, borderColor: l.border, color: l.text },
1664
+ n && { borderColor: l.error }
1665
+ ],
1666
+ value: g,
1667
+ onChangeText: (o) => {
1668
+ if (a(o), o.trim() === "") {
1669
+ i(null);
1807
1670
  return;
1808
1671
  }
1809
- const x = Number(u);
1810
- Number.isNaN(x) || s(x);
1672
+ const d = Number(o);
1673
+ Number.isNaN(d) || i(d);
1811
1674
  },
1812
- placeholder: f,
1675
+ placeholder: S,
1676
+ placeholderTextColor: l.textMuted,
1813
1677
  keyboardType: "numeric",
1814
- accessibilityLabel: B
1678
+ accessibilityLabel: p
1815
1679
  }
1816
1680
  ),
1817
- n && /* @__PURE__ */ e.jsx(t, { style: me.error, children: n }),
1818
- m && !n && /* @__PURE__ */ e.jsx(t, { style: me.helperText, children: m })
1681
+ n && /* @__PURE__ */ e.jsx(t, { style: [Se.error, { color: l.error }], children: n }),
1682
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [Se.helperText, { color: l.textMuted }], children: y })
1819
1683
  ] });
1820
- }, me = $.create({
1684
+ }, Se = _.create({
1821
1685
  container: {
1822
1686
  marginBottom: 16
1823
1687
  },
1824
1688
  error: {
1825
- color: "#EF4444",
1826
1689
  fontSize: 12,
1827
1690
  marginTop: 4
1828
1691
  },
1829
1692
  helperText: {
1830
- color: "#6B7280",
1831
1693
  fontSize: 12,
1832
1694
  marginTop: 4
1833
1695
  },
1834
1696
  input: {
1835
- backgroundColor: "#FFFFFF",
1836
- borderColor: "#D1D5DB",
1837
1697
  borderRadius: 6,
1838
1698
  borderWidth: 1,
1839
1699
  fontSize: 14,
1840
1700
  paddingHorizontal: 12,
1841
1701
  paddingVertical: 8
1842
1702
  },
1843
- inputError: {
1844
- borderColor: "#EF4444"
1845
- },
1846
1703
  label: {
1847
- color: "#374151",
1848
1704
  fontSize: 14,
1849
1705
  fontWeight: "500",
1850
1706
  marginBottom: 8
1851
- },
1852
- required: {
1853
- color: "#EF4444"
1854
1707
  }
1855
- }), ht = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => {
1856
- const [y, S] = A(!1);
1857
- return /* @__PURE__ */ e.jsxs(l, { style: ie.container, children: [
1858
- /* @__PURE__ */ e.jsxs(t, { style: ie.label, children: [
1859
- a || r.data.name,
1860
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: ie.required, children: "*" })
1708
+ }), pt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
1709
+ const { colors: l } = q(), [g, a] = R(!1);
1710
+ return /* @__PURE__ */ e.jsxs(x, { style: de.container, children: [
1711
+ /* @__PURE__ */ e.jsxs(t, { style: [de.label, { color: l.textSecondary }], children: [
1712
+ c || r.data.name,
1713
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
1861
1714
  ] }),
1862
- /* @__PURE__ */ e.jsxs(l, { style: ie.inputWrapper, children: [
1715
+ /* @__PURE__ */ e.jsxs(x, { style: de.inputWrapper, children: [
1863
1716
  /* @__PURE__ */ e.jsx(
1864
- ge,
1717
+ me,
1865
1718
  {
1866
- style: [ie.input, n && ie.inputError],
1867
- value: o ?? "",
1868
- onChangeText: s,
1869
- placeholder: f,
1870
- secureTextEntry: !y,
1871
- accessibilityLabel: B
1719
+ style: [
1720
+ de.input,
1721
+ { backgroundColor: l.input, borderColor: l.border, color: l.text },
1722
+ n && { borderColor: l.error }
1723
+ ],
1724
+ value: s ?? "",
1725
+ onChangeText: i,
1726
+ placeholder: S,
1727
+ placeholderTextColor: l.textMuted,
1728
+ secureTextEntry: !g,
1729
+ accessibilityLabel: p
1872
1730
  }
1873
1731
  ),
1874
- /* @__PURE__ */ e.jsx(h, { style: ie.toggleButton, onPress: () => S(!y), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: ie.toggleText, children: y ? "Hide" : "Show" }) })
1732
+ /* @__PURE__ */ e.jsx(h, { style: de.toggleButton, onPress: () => a(!g), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: [de.toggleText, { color: l.primary }], children: g ? "Hide" : "Show" }) })
1875
1733
  ] }),
1876
- n && /* @__PURE__ */ e.jsx(t, { style: ie.error, children: n }),
1877
- m && !n && /* @__PURE__ */ e.jsx(t, { style: ie.helperText, children: m })
1734
+ n && /* @__PURE__ */ e.jsx(t, { style: [de.error, { color: l.error }], children: n }),
1735
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [de.helperText, { color: l.textMuted }], children: y })
1878
1736
  ] });
1879
- }, ie = $.create({
1737
+ }, de = _.create({
1880
1738
  container: {
1881
1739
  marginBottom: 16
1882
1740
  },
1883
1741
  error: {
1884
- color: "#EF4444",
1885
1742
  fontSize: 12,
1886
1743
  marginTop: 4
1887
1744
  },
1888
1745
  helperText: {
1889
- color: "#6B7280",
1890
1746
  fontSize: 12,
1891
1747
  marginTop: 4
1892
1748
  },
1893
1749
  input: {
1894
- backgroundColor: "#FFFFFF",
1895
- borderColor: "#D1D5DB",
1896
1750
  borderRadius: 6,
1897
1751
  borderWidth: 1,
1898
1752
  flex: 1,
@@ -1900,23 +1754,16 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1900
1754
  paddingHorizontal: 12,
1901
1755
  paddingVertical: 8
1902
1756
  },
1903
- inputError: {
1904
- borderColor: "#EF4444"
1905
- },
1906
1757
  inputWrapper: {
1907
1758
  alignItems: "center",
1908
1759
  flexDirection: "row",
1909
1760
  position: "relative"
1910
1761
  },
1911
1762
  label: {
1912
- color: "#374151",
1913
1763
  fontSize: 14,
1914
1764
  fontWeight: "500",
1915
1765
  marginBottom: 8
1916
1766
  },
1917
- required: {
1918
- color: "#EF4444"
1919
- },
1920
1767
  toggleButton: {
1921
1768
  paddingHorizontal: 12,
1922
1769
  paddingVertical: 8,
@@ -1924,55 +1771,61 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1924
1771
  right: 0
1925
1772
  },
1926
1773
  toggleText: {
1927
- color: "#3B82F6",
1928
1774
  fontSize: 12,
1929
1775
  fontWeight: "600"
1930
1776
  }
1931
- }), mt = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
1932
- const m = ne(), B = r.data.options || [], y = o || "", S = (u) => {
1933
- s(u);
1777
+ }), ht = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
1778
+ const y = se(), { colors: p } = q(), l = r.data.options || [], g = s || "", a = (o) => {
1779
+ i(o);
1934
1780
  };
1935
- return /* @__PURE__ */ e.jsxs(l, { style: oe.container, children: [
1936
- /* @__PURE__ */ e.jsxs(t, { style: oe.label, children: [
1937
- a || r.data.name,
1938
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: oe.required, children: "*" })
1781
+ return /* @__PURE__ */ e.jsxs(x, { style: ue.container, children: [
1782
+ /* @__PURE__ */ e.jsxs(t, { style: [ue.label, { color: p.textSecondary }], children: [
1783
+ c || r.data.name,
1784
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: p.error }, children: "*" })
1939
1785
  ] }),
1940
- B.map((u) => {
1941
- const x = y === u.value;
1786
+ l.map((o) => {
1787
+ const d = g === o.value;
1942
1788
  return /* @__PURE__ */ e.jsxs(
1943
1789
  h,
1944
1790
  {
1945
- style: oe.option,
1946
- onPress: () => S(u.value),
1947
- disabled: u.disabled,
1791
+ style: ue.option,
1792
+ onPress: () => a(o.value),
1793
+ disabled: o.disabled,
1948
1794
  activeOpacity: 0.7,
1949
1795
  children: [
1950
- /* @__PURE__ */ e.jsx(l, { style: [oe.radio, x && oe.radioSelected], children: x && /* @__PURE__ */ e.jsx(l, { style: oe.radioInner }) }),
1951
- /* @__PURE__ */ e.jsx(t, { style: [oe.optionLabel, u.disabled && oe.optionLabelDisabled], children: m(u.label) || u.value })
1796
+ /* @__PURE__ */ e.jsx(
1797
+ x,
1798
+ {
1799
+ style: [
1800
+ ue.radio,
1801
+ { backgroundColor: p.input, borderColor: p.border },
1802
+ d && { borderColor: p.primary }
1803
+ ],
1804
+ children: d && /* @__PURE__ */ e.jsx(x, { style: [ue.radioInner, { backgroundColor: p.primary }] })
1805
+ }
1806
+ ),
1807
+ /* @__PURE__ */ e.jsx(t, { style: [ue.optionLabel, { color: p.textSecondary }, o.disabled && { color: p.textMuted }], children: y(o.label) || o.value })
1952
1808
  ]
1953
1809
  },
1954
- u.value
1810
+ o.value
1955
1811
  );
1956
1812
  }),
1957
- n && /* @__PURE__ */ e.jsx(t, { style: oe.error, children: n }),
1958
- f && !n && /* @__PURE__ */ e.jsx(t, { style: oe.helperText, children: f })
1813
+ n && /* @__PURE__ */ e.jsx(t, { style: [ue.error, { color: p.error }], children: n }),
1814
+ S && !n && /* @__PURE__ */ e.jsx(t, { style: [ue.helperText, { color: p.textMuted }], children: S })
1959
1815
  ] });
1960
- }, oe = $.create({
1816
+ }, ue = _.create({
1961
1817
  container: {
1962
1818
  marginBottom: 16
1963
1819
  },
1964
1820
  error: {
1965
- color: "#EF4444",
1966
1821
  fontSize: 12,
1967
1822
  marginTop: 4
1968
1823
  },
1969
1824
  helperText: {
1970
- color: "#6B7280",
1971
1825
  fontSize: 12,
1972
1826
  marginTop: 4
1973
1827
  },
1974
1828
  label: {
1975
- color: "#374151",
1976
1829
  fontSize: 14,
1977
1830
  fontWeight: "500",
1978
1831
  marginBottom: 8
@@ -1983,16 +1836,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
1983
1836
  marginBottom: 8
1984
1837
  },
1985
1838
  optionLabel: {
1986
- color: "#374151",
1987
1839
  fontSize: 14
1988
1840
  },
1989
- optionLabelDisabled: {
1990
- color: "#9CA3AF"
1991
- },
1992
1841
  radio: {
1993
1842
  alignItems: "center",
1994
- backgroundColor: "#FFFFFF",
1995
- borderColor: "#D1D5DB",
1996
1843
  borderRadius: 10,
1997
1844
  borderWidth: 2,
1998
1845
  height: 20,
@@ -2001,80 +1848,78 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2001
1848
  width: 20
2002
1849
  },
2003
1850
  radioInner: {
2004
- backgroundColor: "#3B82F6",
2005
1851
  borderRadius: 5,
2006
1852
  height: 10,
2007
1853
  width: 10
2008
- },
2009
- radioSelected: {
2010
- borderColor: "#3B82F6"
2011
- },
2012
- required: {
2013
- color: "#EF4444"
2014
1854
  }
2015
- }), ft = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
2016
- const [B, y] = A(!1), S = ne(), u = r.data.options || [], x = r.data.multiple, i = Array.isArray(o) ? o : o ? [o] : [], c = (C) => {
2017
- if (x) {
2018
- const g = i.includes(C) ? i.filter((b) => b !== C) : [...i, C];
2019
- s(g);
1855
+ }), ft = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
1856
+ const [p, l] = R(!1), g = se(), { colors: a } = q(), o = r.data.options || [], d = r.data.multiple, m = Array.isArray(s) ? s : s ? [s] : [], C = (w) => {
1857
+ if (d) {
1858
+ const f = m.includes(w) ? m.filter((b) => b !== w) : [...m, w];
1859
+ i(f);
2020
1860
  } else
2021
- s(C), y(!1);
2022
- }, z = () => {
2023
- if (i.length === 0)
2024
- return f || "Select...";
2025
- if (x)
2026
- return u.filter((b) => i.includes(b.value)).map((b) => S(b.label) || b.value).join(", ");
2027
- const C = u.find((g) => g.value === i[0]);
2028
- return C ? S(C.label) || C.value : f || "Select...";
1861
+ i(w), l(!1);
1862
+ }, v = () => {
1863
+ if (m.length === 0)
1864
+ return S || "Select...";
1865
+ if (d)
1866
+ return o.filter((b) => m.includes(b.value)).map((b) => g(b.label) || b.value).join(", ");
1867
+ const w = o.find((f) => f.value === m[0]);
1868
+ return w ? g(w.label) || w.value : S || "Select...";
2029
1869
  };
2030
- return /* @__PURE__ */ e.jsxs(l, { style: M.container, children: [
2031
- /* @__PURE__ */ e.jsxs(t, { style: M.label, children: [
2032
- a || r.data.name,
2033
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: M.required, children: "*" })
2034
- ] }),
2035
- /* @__PURE__ */ e.jsxs(h, { style: [M.trigger, n && M.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
2036
- /* @__PURE__ */ e.jsx(t, { style: [M.triggerText, i.length === 0 && M.triggerPlaceholder], children: z() }),
2037
- /* @__PURE__ */ e.jsx(t, { style: M.arrow, children: "▼" })
1870
+ return /* @__PURE__ */ e.jsxs(x, { style: J.container, children: [
1871
+ /* @__PURE__ */ e.jsxs(t, { style: [J.label, { color: a.textSecondary }], children: [
1872
+ c || r.data.name,
1873
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: a.error }, children: "*" })
2038
1874
  ] }),
2039
- /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: () => y(!1), children: /* @__PURE__ */ e.jsx(h, { style: M.modalOverlay, activeOpacity: 1, onPress: () => y(!1), children: /* @__PURE__ */ e.jsxs(l, { style: M.modalContent, onStartShouldSetResponder: () => !0, children: [
2040
- /* @__PURE__ */ e.jsxs(l, { style: M.modalHeader, children: [
2041
- /* @__PURE__ */ e.jsx(t, { style: M.modalTitle, children: a || r.data.name }),
2042
- /* @__PURE__ */ e.jsx(h, { onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: M.closeButton, children: "✕" }) })
1875
+ /* @__PURE__ */ e.jsxs(
1876
+ h,
1877
+ {
1878
+ style: [J.trigger, { backgroundColor: a.input, borderColor: a.border }, n && { borderColor: a.error }],
1879
+ onPress: () => l(!0),
1880
+ activeOpacity: 0.7,
1881
+ children: [
1882
+ /* @__PURE__ */ e.jsx(t, { style: [J.triggerText, { color: a.text }, m.length === 0 && { color: a.textMuted }], children: v() }),
1883
+ /* @__PURE__ */ e.jsx(t, { style: [J.arrow, { color: a.textMuted }], children: "▼" })
1884
+ ]
1885
+ }
1886
+ ),
1887
+ /* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: () => l(!1), children: /* @__PURE__ */ e.jsx(h, { style: J.modalOverlay, activeOpacity: 1, onPress: () => l(!1), children: /* @__PURE__ */ e.jsxs(x, { style: [J.modalContent, { backgroundColor: a.card }], onStartShouldSetResponder: () => !0, children: [
1888
+ /* @__PURE__ */ e.jsxs(x, { style: [J.modalHeader, { borderBottomColor: a.border }], children: [
1889
+ /* @__PURE__ */ e.jsx(t, { style: [J.modalTitle, { color: a.text }], children: c || r.data.name }),
1890
+ /* @__PURE__ */ e.jsx(h, { onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: [J.closeButton, { color: a.textMuted }], children: "✕" }) })
2043
1891
  ] }),
2044
- /* @__PURE__ */ e.jsx(je, { style: M.optionsList, children: u.map((C) => {
2045
- const g = i.includes(C.value);
1892
+ /* @__PURE__ */ e.jsx(be, { style: J.optionsList, children: o.map((w) => {
1893
+ const f = m.includes(w.value);
2046
1894
  return /* @__PURE__ */ e.jsxs(
2047
1895
  h,
2048
1896
  {
2049
- style: [M.option, g && M.optionSelected],
2050
- onPress: () => c(C.value),
2051
- disabled: C.disabled,
1897
+ style: [J.option, f && { backgroundColor: `${a.primary}20` }],
1898
+ onPress: () => C(w.value),
1899
+ disabled: w.disabled,
2052
1900
  activeOpacity: 0.7,
2053
1901
  children: [
2054
- /* @__PURE__ */ e.jsx(t, { style: [M.optionText, C.disabled && M.optionTextDisabled], children: S(C.label) || C.value }),
2055
- g && /* @__PURE__ */ e.jsx(t, { style: M.checkmark, children: "✓" })
1902
+ /* @__PURE__ */ e.jsx(t, { style: [J.optionText, { color: a.textSecondary }, w.disabled && { color: a.textMuted }], children: g(w.label) || w.value }),
1903
+ f && /* @__PURE__ */ e.jsx(t, { style: [J.checkmark, { color: a.primary }], children: "✓" })
2056
1904
  ]
2057
1905
  },
2058
- C.value
1906
+ w.value
2059
1907
  );
2060
1908
  }) }),
2061
- x && /* @__PURE__ */ e.jsx(h, { style: M.doneButton, onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: M.doneButtonText, children: "Done" }) })
1909
+ d && /* @__PURE__ */ e.jsx(h, { style: [J.doneButton, { backgroundColor: a.primary }], onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: J.doneButtonText, children: "Done" }) })
2062
1910
  ] }) }) }),
2063
- n && /* @__PURE__ */ e.jsx(t, { style: M.error, children: n }),
2064
- m && !n && /* @__PURE__ */ e.jsx(t, { style: M.helperText, children: m })
1911
+ n && /* @__PURE__ */ e.jsx(t, { style: [J.error, { color: a.error }], children: n }),
1912
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [J.helperText, { color: a.textMuted }], children: y })
2065
1913
  ] });
2066
- }, M = $.create({
1914
+ }, J = _.create({
2067
1915
  arrow: {
2068
- color: "#6B7280",
2069
1916
  fontSize: 12
2070
1917
  },
2071
1918
  checkmark: {
2072
- color: "#3B82F6",
2073
1919
  fontSize: 18,
2074
1920
  fontWeight: "700"
2075
1921
  },
2076
1922
  closeButton: {
2077
- color: "#6B7280",
2078
1923
  fontSize: 24,
2079
1924
  fontWeight: "300"
2080
1925
  },
@@ -2083,7 +1928,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2083
1928
  },
2084
1929
  doneButton: {
2085
1930
  alignItems: "center",
2086
- backgroundColor: "#3B82F6",
2087
1931
  borderRadius: 6,
2088
1932
  marginTop: 12,
2089
1933
  paddingVertical: 12
@@ -2094,23 +1938,19 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2094
1938
  fontWeight: "600"
2095
1939
  },
2096
1940
  error: {
2097
- color: "#EF4444",
2098
1941
  fontSize: 12,
2099
1942
  marginTop: 4
2100
1943
  },
2101
1944
  helperText: {
2102
- color: "#6B7280",
2103
1945
  fontSize: 12,
2104
1946
  marginTop: 4
2105
1947
  },
2106
1948
  label: {
2107
- color: "#374151",
2108
1949
  fontSize: 14,
2109
1950
  fontWeight: "500",
2110
1951
  marginBottom: 8
2111
1952
  },
2112
1953
  modalContent: {
2113
- backgroundColor: "#FFFFFF",
2114
1954
  borderRadius: 12,
2115
1955
  maxHeight: "80%",
2116
1956
  padding: 16,
@@ -2118,7 +1958,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2118
1958
  },
2119
1959
  modalHeader: {
2120
1960
  alignItems: "center",
2121
- borderBottomColor: "#E5E7EB",
2122
1961
  borderBottomWidth: 1,
2123
1962
  flexDirection: "row",
2124
1963
  justifyContent: "space-between",
@@ -2132,7 +1971,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2132
1971
  justifyContent: "center"
2133
1972
  },
2134
1973
  modalTitle: {
2135
- color: "#111827",
2136
1974
  fontSize: 18,
2137
1975
  fontWeight: "600"
2138
1976
  },
@@ -2144,26 +1982,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2144
1982
  paddingHorizontal: 12,
2145
1983
  paddingVertical: 12
2146
1984
  },
2147
- optionSelected: {
2148
- backgroundColor: "#EFF6FF"
2149
- },
2150
1985
  optionsList: {
2151
1986
  maxHeight: 300
2152
1987
  },
2153
1988
  optionText: {
2154
- color: "#374151",
2155
1989
  fontSize: 14
2156
1990
  },
2157
- optionTextDisabled: {
2158
- color: "#9CA3AF"
2159
- },
2160
- required: {
2161
- color: "#EF4444"
2162
- },
2163
1991
  trigger: {
2164
1992
  alignItems: "center",
2165
- backgroundColor: "#FFFFFF",
2166
- borderColor: "#D1D5DB",
2167
1993
  borderRadius: 6,
2168
1994
  borderWidth: 1,
2169
1995
  flexDirection: "row",
@@ -2171,266 +1997,280 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2171
1997
  paddingHorizontal: 12,
2172
1998
  paddingVertical: 10
2173
1999
  },
2174
- triggerError: {
2175
- borderColor: "#EF4444"
2176
- },
2177
- triggerPlaceholder: {
2178
- color: "#9CA3AF"
2179
- },
2180
2000
  triggerText: {
2181
- color: "#374151",
2182
2001
  flex: 1,
2183
2002
  fontSize: 14
2184
2003
  }
2185
- }), pt = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
2186
- const m = !!o;
2187
- return /* @__PURE__ */ e.jsxs(l, { style: fe.container, children: [
2188
- /* @__PURE__ */ e.jsxs(l, { style: fe.row, children: [
2189
- /* @__PURE__ */ e.jsx(l, { style: fe.labelContainer, children: /* @__PURE__ */ e.jsxs(t, { style: fe.label, children: [
2190
- a || r.data.name,
2191
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: fe.required, children: "*" })
2004
+ }), bt = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
2005
+ const { colors: y } = q(), p = !!s;
2006
+ return /* @__PURE__ */ e.jsxs(x, { style: pe.container, children: [
2007
+ /* @__PURE__ */ e.jsxs(x, { style: pe.row, children: [
2008
+ /* @__PURE__ */ e.jsx(x, { style: pe.labelContainer, children: /* @__PURE__ */ e.jsxs(t, { style: [pe.label, { color: y.textSecondary }], children: [
2009
+ c || r.data.name,
2010
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: y.error }, children: "*" })
2192
2011
  ] }) }),
2193
2012
  /* @__PURE__ */ e.jsx(
2194
- Ke,
2013
+ Ze,
2195
2014
  {
2196
- trackColor: { false: "#D1D5DB", true: "#93C5FD" },
2197
- thumbColor: m ? "#3B82F6" : "#F3F4F6",
2198
- ios_backgroundColor: "#D1D5DB",
2199
- onValueChange: s,
2200
- value: m
2015
+ trackColor: { false: y.border, true: `${y.primary}80` },
2016
+ thumbColor: p ? y.primary : y.card,
2017
+ ios_backgroundColor: y.border,
2018
+ onValueChange: i,
2019
+ value: p
2201
2020
  }
2202
2021
  )
2203
2022
  ] }),
2204
- n && /* @__PURE__ */ e.jsx(t, { style: fe.error, children: n }),
2205
- f && !n && /* @__PURE__ */ e.jsx(t, { style: fe.helperText, children: f })
2023
+ n && /* @__PURE__ */ e.jsx(t, { style: [pe.error, { color: y.error }], children: n }),
2024
+ S && !n && /* @__PURE__ */ e.jsx(t, { style: [pe.helperText, { color: y.textMuted }], children: S })
2206
2025
  ] });
2207
- }, fe = $.create({
2026
+ }, pe = _.create({
2208
2027
  container: {
2209
2028
  marginBottom: 16
2210
2029
  },
2211
2030
  error: {
2212
- color: "#EF4444",
2213
2031
  fontSize: 12,
2214
2032
  marginTop: 4
2215
2033
  },
2216
2034
  helperText: {
2217
- color: "#6B7280",
2218
2035
  fontSize: 12,
2219
2036
  marginTop: 4
2220
2037
  },
2221
2038
  label: {
2222
- color: "#374151",
2223
2039
  fontSize: 14,
2224
2040
  fontWeight: "500"
2225
2041
  },
2226
2042
  labelContainer: {
2227
2043
  flex: 1
2228
2044
  },
2229
- required: {
2230
- color: "#EF4444"
2231
- },
2232
2045
  row: {
2233
2046
  alignItems: "center",
2234
2047
  flexDirection: "row",
2235
2048
  justifyContent: "space-between"
2236
2049
  }
2237
- }), yt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => /* @__PURE__ */ e.jsxs(l, { style: pe.container, children: [
2238
- /* @__PURE__ */ e.jsxs(t, { style: pe.label, children: [
2239
- a || r.data.name,
2240
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: pe.required, children: "*" })
2241
- ] }),
2242
- /* @__PURE__ */ e.jsx(
2243
- ge,
2244
- {
2245
- style: [pe.textarea, n && pe.textareaError],
2246
- value: o ?? "",
2247
- onChangeText: s,
2248
- placeholder: f,
2249
- multiline: !0,
2250
- numberOfLines: 4,
2251
- textAlignVertical: "top",
2252
- accessibilityLabel: B
2253
- }
2254
- ),
2255
- n && /* @__PURE__ */ e.jsx(t, { style: pe.error, children: n }),
2256
- m && !n && /* @__PURE__ */ e.jsx(t, { style: pe.helperText, children: m })
2257
- ] }), pe = $.create({
2050
+ }), jt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
2051
+ const { colors: l } = q();
2052
+ return /* @__PURE__ */ e.jsxs(x, { style: Te.container, children: [
2053
+ /* @__PURE__ */ e.jsxs(t, { style: [Te.label, { color: l.textSecondary }], children: [
2054
+ c || r.data.name,
2055
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
2056
+ ] }),
2057
+ /* @__PURE__ */ e.jsx(
2058
+ me,
2059
+ {
2060
+ style: [
2061
+ Te.textarea,
2062
+ { backgroundColor: l.input, borderColor: l.border, color: l.text },
2063
+ n && { borderColor: l.error }
2064
+ ],
2065
+ value: s ?? "",
2066
+ onChangeText: i,
2067
+ placeholder: S,
2068
+ placeholderTextColor: l.textMuted,
2069
+ multiline: !0,
2070
+ numberOfLines: 4,
2071
+ textAlignVertical: "top",
2072
+ accessibilityLabel: p
2073
+ }
2074
+ ),
2075
+ n && /* @__PURE__ */ e.jsx(t, { style: [Te.error, { color: l.error }], children: n }),
2076
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [Te.helperText, { color: l.textMuted }], children: y })
2077
+ ] });
2078
+ }, Te = _.create({
2258
2079
  container: {
2259
2080
  marginBottom: 16
2260
2081
  },
2261
2082
  error: {
2262
- color: "#EF4444",
2263
2083
  fontSize: 12,
2264
2084
  marginTop: 4
2265
2085
  },
2266
2086
  helperText: {
2267
- color: "#6B7280",
2268
2087
  fontSize: 12,
2269
2088
  marginTop: 4
2270
2089
  },
2271
2090
  label: {
2272
- color: "#374151",
2273
2091
  fontSize: 14,
2274
2092
  fontWeight: "500",
2275
2093
  marginBottom: 8
2276
2094
  },
2277
- required: {
2278
- color: "#EF4444"
2279
- },
2280
2095
  textarea: {
2281
- backgroundColor: "#FFFFFF",
2282
- borderColor: "#D1D5DB",
2283
2096
  borderRadius: 6,
2284
2097
  borderWidth: 1,
2285
2098
  fontSize: 14,
2286
2099
  minHeight: 100,
2287
2100
  paddingHorizontal: 12,
2288
2101
  paddingVertical: 8
2289
- },
2290
- textareaError: {
2291
- borderColor: "#EF4444"
2292
2102
  }
2293
- }), xt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => /* @__PURE__ */ e.jsxs(l, { style: ye.container, children: [
2294
- /* @__PURE__ */ e.jsxs(t, { style: ye.label, children: [
2295
- a || r.data.name,
2296
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: ye.required, children: "*" })
2297
- ] }),
2298
- /* @__PURE__ */ e.jsx(
2299
- ge,
2300
- {
2301
- style: [ye.input, n && ye.inputError],
2302
- value: o ?? "",
2303
- onChangeText: s,
2304
- placeholder: f,
2305
- accessibilityLabel: B
2306
- }
2307
- ),
2308
- n && /* @__PURE__ */ e.jsx(t, { style: ye.error, children: n }),
2309
- m && !n && /* @__PURE__ */ e.jsx(t, { style: ye.helperText, children: m })
2310
- ] }), ye = $.create({
2103
+ }), Ct = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
2104
+ const { colors: l } = q();
2105
+ return /* @__PURE__ */ e.jsxs(x, { style: ke.container, children: [
2106
+ /* @__PURE__ */ e.jsxs(t, { style: [ke.label, { color: l.textSecondary }], children: [
2107
+ c || r.data.name,
2108
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
2109
+ ] }),
2110
+ /* @__PURE__ */ e.jsx(
2111
+ me,
2112
+ {
2113
+ style: [
2114
+ ke.input,
2115
+ { backgroundColor: l.input, borderColor: l.border, color: l.text },
2116
+ n && { borderColor: l.error }
2117
+ ],
2118
+ value: s ?? "",
2119
+ onChangeText: i,
2120
+ placeholder: S,
2121
+ placeholderTextColor: l.textMuted,
2122
+ accessibilityLabel: p
2123
+ }
2124
+ ),
2125
+ n && /* @__PURE__ */ e.jsx(t, { style: [ke.error, { color: l.error }], children: n }),
2126
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [ke.helperText, { color: l.textMuted }], children: y })
2127
+ ] });
2128
+ }, ke = _.create({
2311
2129
  container: {
2312
2130
  marginBottom: 16
2313
2131
  },
2314
2132
  error: {
2315
- color: "#EF4444",
2316
2133
  fontSize: 12,
2317
2134
  marginTop: 4
2318
2135
  },
2319
2136
  helperText: {
2320
- color: "#6B7280",
2321
2137
  fontSize: 12,
2322
2138
  marginTop: 4
2323
2139
  },
2324
2140
  input: {
2325
- backgroundColor: "#FFFFFF",
2326
- borderColor: "#D1D5DB",
2327
2141
  borderRadius: 6,
2328
2142
  borderWidth: 1,
2329
2143
  fontSize: 14,
2330
2144
  paddingHorizontal: 12,
2331
2145
  paddingVertical: 8
2332
2146
  },
2333
- inputError: {
2334
- borderColor: "#EF4444"
2335
- },
2336
2147
  label: {
2337
- color: "#374151",
2338
2148
  fontSize: 14,
2339
2149
  fontWeight: "500",
2340
2150
  marginBottom: 8
2341
- },
2342
- required: {
2343
- color: "#EF4444"
2344
2151
  }
2345
- }), bt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
2346
- const [B, y] = A(!1), u = (o || "").split(":"), x = Number.parseInt(u[0], 10), i = Number.parseInt(u[1], 10), c = Number.isNaN(x) ? 0 : x, z = Number.isNaN(i) ? 0 : i, [C, g] = A(c || 0), [b, j] = A(z || 0), T = le(null), q = le(null), R = Array.from({ length: 24 }, (p, H) => H), k = Array.from({ length: 60 }, (p, H) => H), _ = () => o || f || "Select time", K = he(() => {
2347
- const p = `${String(C).padStart(2, "0")}:${String(b).padStart(2, "0")}`;
2348
- s(p), y(!1);
2349
- }, [C, b, s]), ee = () => {
2350
- g(c || 0), j(z || 0), y(!0);
2152
+ }), St = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
2153
+ const [p, l] = R(!1), { colors: g } = q(), o = (s || "").split(":"), d = Number.parseInt(o[0], 10), m = Number.parseInt(o[1], 10), C = Number.isNaN(d) ? 0 : d, v = Number.isNaN(m) ? 0 : m, [w, f] = R(C || 0), [b, z] = R(v || 0), j = ie(null), P = ie(null), u = Array.from({ length: 24 }, (T, A) => A), D = Array.from({ length: 60 }, (T, A) => A), N = () => s || S || "Select time", K = ye(() => {
2154
+ const T = `${String(w).padStart(2, "0")}:${String(b).padStart(2, "0")}`;
2155
+ i(T), l(!1);
2156
+ }, [w, b, i]), te = () => {
2157
+ f(C || 0), z(v || 0), l(!0);
2351
2158
  };
2352
- return /* @__PURE__ */ e.jsxs(l, { style: w.container, children: [
2353
- /* @__PURE__ */ e.jsxs(t, { style: w.label, children: [
2354
- a || r.data.name,
2355
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: w.required, children: "*" })
2159
+ return /* @__PURE__ */ e.jsxs(x, { style: H.container, children: [
2160
+ /* @__PURE__ */ e.jsxs(t, { style: [H.label, { color: g.textSecondary }], children: [
2161
+ c || r.data.name,
2162
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: g.error }, children: "*" })
2356
2163
  ] }),
2357
- /* @__PURE__ */ e.jsxs(h, { style: [w.trigger, n && w.triggerError], onPress: ee, activeOpacity: 0.7, children: [
2358
- /* @__PURE__ */ e.jsx(t, { style: [w.triggerText, !o && w.triggerPlaceholder], numberOfLines: 1, children: _() }),
2359
- /* @__PURE__ */ e.jsx(t, { style: w.icon, children: "🕐" })
2360
- ] }),
2361
- /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: () => y(!1), children: /* @__PURE__ */ e.jsx(h, { style: w.modalOverlay, activeOpacity: 1, onPress: () => y(!1), children: /* @__PURE__ */ e.jsxs(h, { style: w.modalContent, activeOpacity: 1, onPress: () => {
2164
+ /* @__PURE__ */ e.jsxs(
2165
+ h,
2166
+ {
2167
+ style: [H.trigger, { backgroundColor: g.input, borderColor: g.border }, n && { borderColor: g.error }],
2168
+ onPress: te,
2169
+ activeOpacity: 0.7,
2170
+ children: [
2171
+ /* @__PURE__ */ e.jsx(t, { style: [H.triggerText, { color: g.text }, !s && { color: g.textMuted }], numberOfLines: 1, children: N() }),
2172
+ /* @__PURE__ */ e.jsx(t, { style: H.icon, children: "🕐" })
2173
+ ]
2174
+ }
2175
+ ),
2176
+ /* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: () => l(!1), children: /* @__PURE__ */ e.jsx(h, { style: H.modalOverlay, activeOpacity: 1, onPress: () => l(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [H.modalContent, { backgroundColor: g.card }], activeOpacity: 1, onPress: () => {
2362
2177
  }, children: [
2363
- /* @__PURE__ */ e.jsxs(l, { style: w.modalHeader, children: [
2364
- /* @__PURE__ */ e.jsx(t, { style: w.modalTitle, children: a || r.data.name }),
2365
- /* @__PURE__ */ e.jsx(h, { onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: w.closeButton, children: "✕" }) })
2178
+ /* @__PURE__ */ e.jsxs(x, { style: [H.modalHeader, { borderBottomColor: g.separator }], children: [
2179
+ /* @__PURE__ */ e.jsx(t, { style: [H.modalTitle, { color: g.text }], children: c || r.data.name }),
2180
+ /* @__PURE__ */ e.jsx(h, { onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: [H.closeButton, { color: g.textMuted }], children: "✕" }) })
2366
2181
  ] }),
2367
- /* @__PURE__ */ e.jsxs(l, { style: w.pickerContainer, children: [
2368
- /* @__PURE__ */ e.jsxs(l, { style: w.pickerColumn, children: [
2369
- /* @__PURE__ */ e.jsx(t, { style: w.pickerLabel, children: "Hour" }),
2182
+ /* @__PURE__ */ e.jsxs(x, { style: H.pickerContainer, children: [
2183
+ /* @__PURE__ */ e.jsxs(x, { style: H.pickerColumn, children: [
2184
+ /* @__PURE__ */ e.jsx(t, { style: [H.pickerLabel, { color: g.textMuted }], children: "Hour" }),
2370
2185
  /* @__PURE__ */ e.jsx(
2371
- je,
2186
+ be,
2372
2187
  {
2373
- ref: T,
2374
- style: w.picker,
2375
- contentContainerStyle: w.pickerContent,
2188
+ ref: j,
2189
+ style: H.picker,
2190
+ contentContainerStyle: H.pickerContent,
2376
2191
  showsVerticalScrollIndicator: !1,
2377
- children: R.map((p) => /* @__PURE__ */ e.jsx(
2192
+ children: u.map((T) => /* @__PURE__ */ e.jsx(
2378
2193
  h,
2379
2194
  {
2380
- style: [w.pickerItem, C === p && w.pickerItemSelected],
2381
- onPress: () => g(p),
2195
+ style: [H.pickerItem, w === T && { backgroundColor: g.primary }],
2196
+ onPress: () => f(T),
2382
2197
  activeOpacity: 0.7,
2383
- children: /* @__PURE__ */ e.jsx(t, { style: [w.pickerItemText, C === p && w.pickerItemTextSelected], children: String(p).padStart(2, "0") })
2198
+ children: /* @__PURE__ */ e.jsx(
2199
+ t,
2200
+ {
2201
+ style: [
2202
+ H.pickerItemText,
2203
+ { color: g.text },
2204
+ w === T && { color: g.background, fontWeight: "600" }
2205
+ ],
2206
+ children: String(T).padStart(2, "0")
2207
+ }
2208
+ )
2384
2209
  },
2385
- p
2210
+ T
2386
2211
  ))
2387
2212
  }
2388
2213
  )
2389
2214
  ] }),
2390
- /* @__PURE__ */ e.jsx(t, { style: w.pickerSeparator, children: ":" }),
2391
- /* @__PURE__ */ e.jsxs(l, { style: w.pickerColumn, children: [
2392
- /* @__PURE__ */ e.jsx(t, { style: w.pickerLabel, children: "Minute" }),
2215
+ /* @__PURE__ */ e.jsx(t, { style: [H.pickerSeparator, { color: g.text }], children: ":" }),
2216
+ /* @__PURE__ */ e.jsxs(x, { style: H.pickerColumn, children: [
2217
+ /* @__PURE__ */ e.jsx(t, { style: [H.pickerLabel, { color: g.textMuted }], children: "Minute" }),
2393
2218
  /* @__PURE__ */ e.jsx(
2394
- je,
2219
+ be,
2395
2220
  {
2396
- ref: q,
2397
- style: w.picker,
2398
- contentContainerStyle: w.pickerContent,
2221
+ ref: P,
2222
+ style: H.picker,
2223
+ contentContainerStyle: H.pickerContent,
2399
2224
  showsVerticalScrollIndicator: !1,
2400
- children: k.map((p) => /* @__PURE__ */ e.jsx(
2225
+ children: D.map((T) => /* @__PURE__ */ e.jsx(
2401
2226
  h,
2402
2227
  {
2403
- style: [w.pickerItem, b === p && w.pickerItemSelected],
2404
- onPress: () => j(p),
2228
+ style: [H.pickerItem, b === T && { backgroundColor: g.primary }],
2229
+ onPress: () => z(T),
2405
2230
  activeOpacity: 0.7,
2406
- children: /* @__PURE__ */ e.jsx(t, { style: [w.pickerItemText, b === p && w.pickerItemTextSelected], children: String(p).padStart(2, "0") })
2231
+ children: /* @__PURE__ */ e.jsx(
2232
+ t,
2233
+ {
2234
+ style: [
2235
+ H.pickerItemText,
2236
+ { color: g.text },
2237
+ b === T && { color: g.background, fontWeight: "600" }
2238
+ ],
2239
+ children: String(T).padStart(2, "0")
2240
+ }
2241
+ )
2407
2242
  },
2408
- p
2243
+ T
2409
2244
  ))
2410
2245
  }
2411
2246
  )
2412
2247
  ] })
2413
2248
  ] }),
2414
- /* @__PURE__ */ e.jsx(h, { style: w.confirmButton, onPress: K, activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: w.confirmButtonText, children: "Confirm" }) })
2249
+ /* @__PURE__ */ e.jsx(
2250
+ h,
2251
+ {
2252
+ style: [H.confirmButton, { backgroundColor: g.primary }],
2253
+ onPress: K,
2254
+ activeOpacity: 0.7,
2255
+ children: /* @__PURE__ */ e.jsx(t, { style: [H.confirmButtonText, { color: g.background }], children: "Confirm" })
2256
+ }
2257
+ )
2415
2258
  ] }) }) }),
2416
- n && /* @__PURE__ */ e.jsx(t, { style: w.error, children: n }),
2417
- m && !n && /* @__PURE__ */ e.jsx(t, { style: w.helperText, children: m })
2259
+ n && /* @__PURE__ */ e.jsx(t, { style: [H.error, { color: g.error }], children: n }),
2260
+ y && !n && /* @__PURE__ */ e.jsx(t, { style: [H.helperText, { color: g.textMuted }], children: y })
2418
2261
  ] });
2419
- }, w = $.create({
2262
+ }, H = _.create({
2420
2263
  closeButton: {
2421
- color: "#6B7280",
2422
2264
  fontSize: 24,
2423
2265
  fontWeight: "300"
2424
2266
  },
2425
2267
  confirmButton: {
2426
2268
  alignItems: "center",
2427
- backgroundColor: "#3B82F6",
2428
2269
  borderRadius: 6,
2429
2270
  marginTop: 16,
2430
2271
  paddingVertical: 12
2431
2272
  },
2432
2273
  confirmButtonText: {
2433
- color: "#FFFFFF",
2434
2274
  fontSize: 16,
2435
2275
  fontWeight: "600"
2436
2276
  },
@@ -2438,12 +2278,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2438
2278
  marginBottom: 16
2439
2279
  },
2440
2280
  error: {
2441
- color: "#EF4444",
2442
2281
  fontSize: 12,
2443
2282
  marginTop: 4
2444
2283
  },
2445
2284
  helperText: {
2446
- color: "#6B7280",
2447
2285
  fontSize: 12,
2448
2286
  marginTop: 4
2449
2287
  },
@@ -2451,20 +2289,17 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2451
2289
  fontSize: 16
2452
2290
  },
2453
2291
  label: {
2454
- color: "#374151",
2455
2292
  fontSize: 14,
2456
2293
  fontWeight: "500",
2457
2294
  marginBottom: 8
2458
2295
  },
2459
2296
  modalContent: {
2460
- backgroundColor: "#FFFFFF",
2461
2297
  borderRadius: 12,
2462
2298
  padding: 16,
2463
2299
  width: "80%"
2464
2300
  },
2465
2301
  modalHeader: {
2466
2302
  alignItems: "center",
2467
- borderBottomColor: "#E5E7EB",
2468
2303
  borderBottomWidth: 1,
2469
2304
  flexDirection: "row",
2470
2305
  justifyContent: "space-between",
@@ -2478,7 +2313,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2478
2313
  justifyContent: "center"
2479
2314
  },
2480
2315
  modalTitle: {
2481
- color: "#111827",
2482
2316
  fontSize: 18,
2483
2317
  fontWeight: "600"
2484
2318
  },
@@ -2502,36 +2336,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2502
2336
  marginVertical: 2,
2503
2337
  paddingVertical: 10
2504
2338
  },
2505
- pickerItemSelected: {
2506
- backgroundColor: "#3B82F6"
2507
- },
2508
2339
  pickerItemText: {
2509
- color: "#374151",
2510
2340
  fontSize: 18
2511
2341
  },
2512
- pickerItemTextSelected: {
2513
- color: "#FFFFFF",
2514
- fontWeight: "600"
2515
- },
2516
2342
  pickerLabel: {
2517
- color: "#6B7280",
2518
2343
  fontSize: 12,
2519
2344
  fontWeight: "600",
2520
2345
  marginBottom: 8,
2521
2346
  textAlign: "center"
2522
2347
  },
2523
2348
  pickerSeparator: {
2524
- color: "#374151",
2525
2349
  fontSize: 24,
2526
2350
  fontWeight: "600"
2527
2351
  },
2528
- required: {
2529
- color: "#EF4444"
2530
- },
2531
2352
  trigger: {
2532
2353
  alignItems: "center",
2533
- backgroundColor: "#FFFFFF",
2534
- borderColor: "#D1D5DB",
2535
2354
  borderRadius: 6,
2536
2355
  borderWidth: 1,
2537
2356
  flexDirection: "row",
@@ -2539,89 +2358,115 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2539
2358
  paddingHorizontal: 12,
2540
2359
  paddingVertical: 10
2541
2360
  },
2542
- triggerError: {
2543
- borderColor: "#EF4444"
2544
- },
2545
- triggerPlaceholder: {
2546
- color: "#9CA3AF"
2547
- },
2548
2361
  triggerText: {
2549
- color: "#374151",
2550
2362
  flex: 1,
2551
2363
  fontSize: 14
2552
2364
  }
2553
- }), Ft = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
2554
- const [m, B] = A(!1), [y, S] = A(!0), u = ne(), x = Array.isArray(o) ? o : [], i = x[0] || "", c = x[1] || "", z = i.split(":"), C = Number.parseInt(z[0], 10), g = Number.parseInt(z[1], 10), b = Number.isNaN(C) ? 0 : C, j = Number.isNaN(g) ? 0 : g, T = c.split(":"), q = Number.parseInt(T[0], 10), R = Number.parseInt(T[1], 10), k = Number.isNaN(q) ? 0 : q, _ = Number.isNaN(R) ? 0 : R, [K, ee] = A(0), [p, H] = A(0), Q = Array.from({ length: 24 }, (O, ce) => ce), U = Array.from({ length: 60 }, (O, ce) => ce), F = () => i && c ? `${i} - ${c}` : i || u("renderer.defaultInputs.selectDateRange"), v = he(() => {
2555
- const O = `${String(K).padStart(2, "0")}:${String(p).padStart(2, "0")}`;
2556
- y ? (s([O, c]), S(!1), ee(k || 0), H(_ || 0)) : (s([i, O]), B(!1), S(!0));
2557
- }, [y, K, p, i, c, k, _, s]), X = () => {
2558
- ee(b || 0), H(j || 0), S(!0), B(!0);
2365
+ }), Tt = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
2366
+ const [y, p] = R(!1), [l, g] = R(!0), a = se(), { colors: o } = q(), d = Array.isArray(s) ? s : [], m = d[0] || "", C = d[1] || "", v = m.split(":"), w = Number.parseInt(v[0], 10), f = Number.parseInt(v[1], 10), b = Number.isNaN(w) ? 0 : w, z = Number.isNaN(f) ? 0 : f, j = C.split(":"), P = Number.parseInt(j[0], 10), u = Number.parseInt(j[1], 10), D = Number.isNaN(P) ? 0 : P, N = Number.isNaN(u) ? 0 : u, [K, te] = R(0), [T, A] = R(0), Z = Array.from({ length: 24 }, (M, ce) => ce), Q = Array.from({ length: 60 }, (M, ce) => ce), I = () => m && C ? `${m} - ${C}` : m || a("renderer.defaultInputs.selectDateRange"), B = ye(() => {
2367
+ const M = `${String(K).padStart(2, "0")}:${String(T).padStart(2, "0")}`;
2368
+ l ? (i([M, C]), g(!1), te(D || 0), A(N || 0)) : (i([m, M]), p(!1), g(!0));
2369
+ }, [l, K, T, m, C, D, N, i]), ee = () => {
2370
+ te(b || 0), A(z || 0), g(!0), p(!0);
2559
2371
  };
2560
- return /* @__PURE__ */ e.jsxs(l, { style: I.container, children: [
2561
- /* @__PURE__ */ e.jsxs(t, { style: I.label, children: [
2562
- a || r.data.name,
2563
- r.data.required && /* @__PURE__ */ e.jsx(t, { style: I.required, children: "*" })
2372
+ return /* @__PURE__ */ e.jsxs(x, { style: O.container, children: [
2373
+ /* @__PURE__ */ e.jsxs(t, { style: [O.label, { color: o.textSecondary }], children: [
2374
+ c || r.data.name,
2375
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
2564
2376
  ] }),
2565
- /* @__PURE__ */ e.jsxs(h, { style: [I.trigger, n && I.triggerError], onPress: X, activeOpacity: 0.7, children: [
2566
- /* @__PURE__ */ e.jsx(t, { style: [I.triggerText, !i && I.triggerPlaceholder], numberOfLines: 1, children: F() }),
2567
- /* @__PURE__ */ e.jsx(t, { style: I.icon, children: "🕐" })
2568
- ] }),
2569
- /* @__PURE__ */ e.jsx(ae, { visible: m, transparent: !0, animationType: "fade", onRequestClose: () => B(!1), children: /* @__PURE__ */ e.jsx(h, { style: I.modalOverlay, activeOpacity: 1, onPress: () => B(!1), children: /* @__PURE__ */ e.jsxs(h, { style: I.modalContent, activeOpacity: 1, onPress: () => {
2377
+ /* @__PURE__ */ e.jsxs(
2378
+ h,
2379
+ {
2380
+ style: [O.trigger, { backgroundColor: o.input, borderColor: o.border }, n && { borderColor: o.error }],
2381
+ onPress: ee,
2382
+ activeOpacity: 0.7,
2383
+ children: [
2384
+ /* @__PURE__ */ e.jsx(t, { style: [O.triggerText, { color: o.text }, !m && { color: o.textMuted }], numberOfLines: 1, children: I() }),
2385
+ /* @__PURE__ */ e.jsx(t, { style: O.icon, children: "🕐" })
2386
+ ]
2387
+ }
2388
+ ),
2389
+ /* @__PURE__ */ e.jsx(ae, { visible: y, transparent: !0, animationType: "fade", onRequestClose: () => p(!1), children: /* @__PURE__ */ e.jsx(h, { style: O.modalOverlay, activeOpacity: 1, onPress: () => p(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [O.modalContent, { backgroundColor: o.card }], activeOpacity: 1, onPress: () => {
2570
2390
  }, children: [
2571
- /* @__PURE__ */ e.jsxs(l, { style: I.modalHeader, children: [
2572
- /* @__PURE__ */ e.jsx(t, { style: I.modalTitle, children: a || r.data.name }),
2573
- /* @__PURE__ */ e.jsx(h, { onPress: () => B(!1), children: /* @__PURE__ */ e.jsx(t, { style: I.closeButton, children: "✕" }) })
2391
+ /* @__PURE__ */ e.jsxs(x, { style: [O.modalHeader, { borderBottomColor: o.separator }], children: [
2392
+ /* @__PURE__ */ e.jsx(t, { style: [O.modalTitle, { color: o.text }], children: c || r.data.name }),
2393
+ /* @__PURE__ */ e.jsx(h, { onPress: () => p(!1), children: /* @__PURE__ */ e.jsx(t, { style: [O.closeButton, { color: o.textMuted }], children: "✕" }) })
2574
2394
  ] }),
2575
- /* @__PURE__ */ e.jsx(l, { style: I.rangeIndicator, children: /* @__PURE__ */ e.jsx(t, { style: I.rangeIndicatorText, children: u(y ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime") }) }),
2576
- /* @__PURE__ */ e.jsxs(l, { style: I.pickerContainer, children: [
2577
- /* @__PURE__ */ e.jsxs(l, { style: I.pickerColumn, children: [
2578
- /* @__PURE__ */ e.jsx(t, { style: I.pickerLabel, children: "Hour" }),
2579
- /* @__PURE__ */ e.jsx(je, { style: I.picker, contentContainerStyle: I.pickerContent, showsVerticalScrollIndicator: !1, children: Q.map((O) => /* @__PURE__ */ e.jsx(
2395
+ /* @__PURE__ */ e.jsx(x, { style: [O.rangeIndicator, { backgroundColor: o.primaryLight }], children: /* @__PURE__ */ e.jsx(t, { style: [O.rangeIndicatorText, { color: o.primary }], children: a(l ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime") }) }),
2396
+ /* @__PURE__ */ e.jsxs(x, { style: O.pickerContainer, children: [
2397
+ /* @__PURE__ */ e.jsxs(x, { style: O.pickerColumn, children: [
2398
+ /* @__PURE__ */ e.jsx(t, { style: [O.pickerLabel, { color: o.textMuted }], children: "Hour" }),
2399
+ /* @__PURE__ */ e.jsx(be, { style: O.picker, contentContainerStyle: O.pickerContent, showsVerticalScrollIndicator: !1, children: Z.map((M) => /* @__PURE__ */ e.jsx(
2580
2400
  h,
2581
2401
  {
2582
- style: [I.pickerItem, K === O && I.pickerItemSelected],
2583
- onPress: () => ee(O),
2402
+ style: [O.pickerItem, K === M && { backgroundColor: o.primary }],
2403
+ onPress: () => te(M),
2584
2404
  activeOpacity: 0.7,
2585
- children: /* @__PURE__ */ e.jsx(t, { style: [I.pickerItemText, K === O && I.pickerItemTextSelected], children: String(O).padStart(2, "0") })
2405
+ children: /* @__PURE__ */ e.jsx(
2406
+ t,
2407
+ {
2408
+ style: [
2409
+ O.pickerItemText,
2410
+ { color: o.text },
2411
+ K === M && { color: o.background, fontWeight: "600" }
2412
+ ],
2413
+ children: String(M).padStart(2, "0")
2414
+ }
2415
+ )
2586
2416
  },
2587
- O
2417
+ M
2588
2418
  )) })
2589
2419
  ] }),
2590
- /* @__PURE__ */ e.jsx(t, { style: I.pickerSeparator, children: ":" }),
2591
- /* @__PURE__ */ e.jsxs(l, { style: I.pickerColumn, children: [
2592
- /* @__PURE__ */ e.jsx(t, { style: I.pickerLabel, children: "Minute" }),
2593
- /* @__PURE__ */ e.jsx(je, { style: I.picker, contentContainerStyle: I.pickerContent, showsVerticalScrollIndicator: !1, children: U.map((O) => /* @__PURE__ */ e.jsx(
2420
+ /* @__PURE__ */ e.jsx(t, { style: [O.pickerSeparator, { color: o.text }], children: ":" }),
2421
+ /* @__PURE__ */ e.jsxs(x, { style: O.pickerColumn, children: [
2422
+ /* @__PURE__ */ e.jsx(t, { style: [O.pickerLabel, { color: o.textMuted }], children: "Minute" }),
2423
+ /* @__PURE__ */ e.jsx(be, { style: O.picker, contentContainerStyle: O.pickerContent, showsVerticalScrollIndicator: !1, children: Q.map((M) => /* @__PURE__ */ e.jsx(
2594
2424
  h,
2595
2425
  {
2596
- style: [I.pickerItem, p === O && I.pickerItemSelected],
2597
- onPress: () => H(O),
2426
+ style: [O.pickerItem, T === M && { backgroundColor: o.primary }],
2427
+ onPress: () => A(M),
2598
2428
  activeOpacity: 0.7,
2599
- children: /* @__PURE__ */ e.jsx(t, { style: [I.pickerItemText, p === O && I.pickerItemTextSelected], children: String(O).padStart(2, "0") })
2429
+ children: /* @__PURE__ */ e.jsx(
2430
+ t,
2431
+ {
2432
+ style: [
2433
+ O.pickerItemText,
2434
+ { color: o.text },
2435
+ T === M && { color: o.background, fontWeight: "600" }
2436
+ ],
2437
+ children: String(M).padStart(2, "0")
2438
+ }
2439
+ )
2600
2440
  },
2601
- O
2441
+ M
2602
2442
  )) })
2603
2443
  ] })
2604
2444
  ] }),
2605
- /* @__PURE__ */ e.jsx(h, { style: I.confirmButton, onPress: v, activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: I.confirmButtonText, children: y ? "Next" : "Confirm" }) })
2445
+ /* @__PURE__ */ e.jsx(
2446
+ h,
2447
+ {
2448
+ style: [O.confirmButton, { backgroundColor: o.primary }],
2449
+ onPress: B,
2450
+ activeOpacity: 0.7,
2451
+ children: /* @__PURE__ */ e.jsx(t, { style: [O.confirmButtonText, { color: o.background }], children: l ? "Next" : "Confirm" })
2452
+ }
2453
+ )
2606
2454
  ] }) }) }),
2607
- n && /* @__PURE__ */ e.jsx(t, { style: I.error, children: n }),
2608
- f && !n && /* @__PURE__ */ e.jsx(t, { style: I.helperText, children: f })
2455
+ n && /* @__PURE__ */ e.jsx(t, { style: [O.error, { color: o.error }], children: n }),
2456
+ S && !n && /* @__PURE__ */ e.jsx(t, { style: [O.helperText, { color: o.textMuted }], children: S })
2609
2457
  ] });
2610
- }, I = $.create({
2458
+ }, O = _.create({
2611
2459
  closeButton: {
2612
- color: "#6B7280",
2613
2460
  fontSize: 24,
2614
2461
  fontWeight: "300"
2615
2462
  },
2616
2463
  confirmButton: {
2617
2464
  alignItems: "center",
2618
- backgroundColor: "#3B82F6",
2619
2465
  borderRadius: 6,
2620
2466
  marginTop: 16,
2621
2467
  paddingVertical: 12
2622
2468
  },
2623
2469
  confirmButtonText: {
2624
- color: "#FFFFFF",
2625
2470
  fontSize: 16,
2626
2471
  fontWeight: "600"
2627
2472
  },
@@ -2629,12 +2474,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2629
2474
  marginBottom: 16
2630
2475
  },
2631
2476
  error: {
2632
- color: "#EF4444",
2633
2477
  fontSize: 12,
2634
2478
  marginTop: 4
2635
2479
  },
2636
2480
  helperText: {
2637
- color: "#6B7280",
2638
2481
  fontSize: 12,
2639
2482
  marginTop: 4
2640
2483
  },
@@ -2642,20 +2485,17 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2642
2485
  fontSize: 16
2643
2486
  },
2644
2487
  label: {
2645
- color: "#374151",
2646
2488
  fontSize: 14,
2647
2489
  fontWeight: "500",
2648
2490
  marginBottom: 8
2649
2491
  },
2650
2492
  modalContent: {
2651
- backgroundColor: "#FFFFFF",
2652
2493
  borderRadius: 12,
2653
2494
  padding: 16,
2654
2495
  width: "80%"
2655
2496
  },
2656
2497
  modalHeader: {
2657
2498
  alignItems: "center",
2658
- borderBottomColor: "#E5E7EB",
2659
2499
  borderBottomWidth: 1,
2660
2500
  flexDirection: "row",
2661
2501
  justifyContent: "space-between",
@@ -2669,7 +2509,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2669
2509
  justifyContent: "center"
2670
2510
  },
2671
2511
  modalTitle: {
2672
- color: "#111827",
2673
2512
  fontSize: 18,
2674
2513
  fontWeight: "600"
2675
2514
  },
@@ -2693,48 +2532,31 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2693
2532
  marginVertical: 2,
2694
2533
  paddingVertical: 10
2695
2534
  },
2696
- pickerItemSelected: {
2697
- backgroundColor: "#3B82F6"
2698
- },
2699
2535
  pickerItemText: {
2700
- color: "#374151",
2701
2536
  fontSize: 18
2702
2537
  },
2703
- pickerItemTextSelected: {
2704
- color: "#FFFFFF",
2705
- fontWeight: "600"
2706
- },
2707
2538
  pickerLabel: {
2708
- color: "#6B7280",
2709
2539
  fontSize: 12,
2710
2540
  fontWeight: "600",
2711
2541
  marginBottom: 8,
2712
2542
  textAlign: "center"
2713
2543
  },
2714
2544
  pickerSeparator: {
2715
- color: "#374151",
2716
2545
  fontSize: 24,
2717
2546
  fontWeight: "600"
2718
2547
  },
2719
2548
  rangeIndicator: {
2720
2549
  alignItems: "center",
2721
- backgroundColor: "#EFF6FF",
2722
2550
  borderRadius: 6,
2723
2551
  marginBottom: 12,
2724
2552
  paddingVertical: 8
2725
2553
  },
2726
2554
  rangeIndicatorText: {
2727
- color: "#3B82F6",
2728
2555
  fontSize: 14,
2729
2556
  fontWeight: "600"
2730
2557
  },
2731
- required: {
2732
- color: "#EF4444"
2733
- },
2734
2558
  trigger: {
2735
2559
  alignItems: "center",
2736
- backgroundColor: "#FFFFFF",
2737
- borderColor: "#D1D5DB",
2738
2560
  borderRadius: 6,
2739
2561
  borderWidth: 1,
2740
2562
  flexDirection: "row",
@@ -2742,166 +2564,205 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2742
2564
  paddingHorizontal: 12,
2743
2565
  paddingVertical: 10
2744
2566
  },
2745
- triggerError: {
2746
- borderColor: "#EF4444"
2747
- },
2748
- triggerPlaceholder: {
2749
- color: "#9CA3AF"
2750
- },
2751
2567
  triggerText: {
2752
- color: "#374151",
2753
2568
  flex: 1,
2754
2569
  fontSize: 14
2755
2570
  }
2756
- }), jt = ({ node: r }) => /* @__PURE__ */ e.jsxs(t, { children: [
2571
+ }), kt = ({ node: r }) => /* @__PURE__ */ e.jsxs(t, { children: [
2757
2572
  "TODO: Implement ",
2758
2573
  r.data.type,
2759
2574
  " input for React Native"
2760
- ] }), Ct = jt, St = {
2761
- address: rt,
2762
- autocomplete: nt,
2763
- checkbox: ot,
2764
- date: st,
2765
- daterange: it,
2766
- file: lt,
2767
- hidden: at,
2768
- http: ut,
2769
- number: gt,
2770
- password: ht,
2771
- radio: mt,
2575
+ ] }), It = kt, zt = {
2576
+ address: st,
2577
+ autocomplete: lt,
2578
+ checkbox: it,
2579
+ date: at,
2580
+ daterange: ct,
2581
+ file: dt,
2582
+ hidden: ut,
2583
+ http: mt,
2584
+ number: yt,
2585
+ password: pt,
2586
+ radio: ht,
2772
2587
  select: ft,
2773
- submit: Ct,
2774
- switch: pt,
2775
- text: xt,
2776
- textarea: yt,
2777
- time: bt,
2778
- timerange: Ft
2779
- }, Tt = ({ children: r = "Submit", disabled: o, isSubmitting: s, onPress: n }) => /* @__PURE__ */ e.jsx(
2780
- h,
2781
- {
2782
- style: [ve.button, (o || s) && ve.buttonDisabled],
2783
- disabled: o || s,
2784
- onPress: n,
2785
- activeOpacity: 0.7,
2786
- children: s ? /* @__PURE__ */ e.jsx(be, { color: "#FFFFFF" }) : /* @__PURE__ */ e.jsx(t, { style: ve.buttonText, children: r })
2787
- }
2788
- ), ve = $.create({
2588
+ submit: It,
2589
+ switch: bt,
2590
+ text: Ct,
2591
+ textarea: jt,
2592
+ time: St,
2593
+ timerange: Tt
2594
+ }, wt = ({ children: r = "Submit", disabled: s, isSubmitting: i, onPress: n }) => {
2595
+ const { colors: c } = q();
2596
+ return /* @__PURE__ */ e.jsx(
2597
+ h,
2598
+ {
2599
+ style: [
2600
+ Ae.button,
2601
+ { backgroundColor: c.primary },
2602
+ (s || i) && { backgroundColor: c.primaryDisabled, opacity: 0.6 }
2603
+ ],
2604
+ disabled: s || i,
2605
+ onPress: n,
2606
+ activeOpacity: 0.7,
2607
+ children: i ? /* @__PURE__ */ e.jsx(he, { color: c.primaryForeground }) : /* @__PURE__ */ e.jsx(t, { style: [Ae.buttonText, { color: c.primaryForeground }], children: r })
2608
+ }
2609
+ );
2610
+ }, Ae = _.create({
2789
2611
  button: {
2790
2612
  alignItems: "center",
2791
- backgroundColor: "#3B82F6",
2792
2613
  borderRadius: 6,
2793
2614
  justifyContent: "center",
2794
2615
  marginTop: 16,
2795
2616
  paddingHorizontal: 24,
2796
2617
  paddingVertical: 12
2797
2618
  },
2798
- buttonDisabled: {
2799
- backgroundColor: "#9CA3AF",
2800
- opacity: 0.6
2801
- },
2802
2619
  buttonText: {
2803
- color: "#FFFFFF",
2804
2620
  fontSize: 16,
2805
2621
  fontWeight: "600"
2806
2622
  }
2807
- }), Bt = ({ children: r }) => r, Dt = ({ node: r }) => {
2808
- const s = ne()(r.data?.label);
2809
- return /* @__PURE__ */ e.jsx(t, { style: Le.title, children: s });
2810
- }, It = () => /* @__PURE__ */ e.jsx(l, { style: Le.divider }), Le = $.create({
2623
+ }), vt = ({ children: r }) => r, Dt = ({ node: r }) => {
2624
+ const s = se(), { colors: i } = q(), n = s(r.data?.label);
2625
+ return /* @__PURE__ */ e.jsx(t, { style: [Ne.title, { color: i.text }], children: n });
2626
+ }, Bt = () => {
2627
+ const { colors: r } = q();
2628
+ return /* @__PURE__ */ e.jsx(x, { style: [Ne.divider, { backgroundColor: r.separator }] });
2629
+ }, Ne = _.create({
2811
2630
  divider: {
2812
- backgroundColor: "#E5E7EB",
2813
2631
  height: 1,
2814
2632
  marginBottom: 16,
2815
2633
  marginTop: 0
2816
2634
  },
2817
2635
  title: {
2818
- color: "#111827",
2819
2636
  fontSize: 20,
2820
2637
  fontWeight: "700",
2821
2638
  marginBottom: 16
2822
2639
  }
2823
- }), kt = {
2824
- divider: It,
2640
+ }), Mt = {
2641
+ divider: Bt,
2825
2642
  title: Dt
2826
2643
  }, Ot = ({
2827
2644
  components: r,
2828
- contentContainerStyle: o,
2829
- flows: s,
2645
+ contentContainerStyle: s,
2646
+ flows: i,
2830
2647
  googleApiKey: n,
2831
- language: a,
2832
- onChange: f,
2833
- onSubmit: m,
2834
- style: B,
2835
- validate: y,
2836
- validationMode: S,
2837
- initialValues: u = {}
2648
+ initialValues: c,
2649
+ language: S,
2650
+ onChange: y,
2651
+ onSubmit: p,
2652
+ style: l,
2653
+ theme: g,
2654
+ validate: a,
2655
+ validationMode: o
2838
2656
  }) => {
2839
- const {
2840
- canSubmit: x,
2841
- clearSubmitMessage: i,
2842
- config: c,
2843
- formErrors: z,
2844
- formValues: C,
2845
- handleSubmit: g,
2846
- inputNodes: b,
2657
+ const { colors: d } = q(), {
2658
+ canSubmit: m,
2659
+ clearSubmitMessage: C,
2660
+ config: v,
2661
+ formErrors: w,
2662
+ formValues: f,
2663
+ handleSubmit: b,
2664
+ inputNodes: z,
2847
2665
  isSubmitting: j,
2848
- mergedFlow: T,
2849
- missingRequiredFields: q,
2850
- setFieldValue: R,
2851
- submitMessage: k,
2852
- t: _,
2853
- visibleNodes: K,
2854
- visibleRootNodes: ee
2855
- } = Ye({
2666
+ mergedFlow: P,
2667
+ missingRequiredFields: u,
2668
+ setFieldValue: D,
2669
+ submitMessage: N,
2670
+ t: K,
2671
+ visibleNodes: te,
2672
+ visibleRootNodes: T
2673
+ } = Ue({
2856
2674
  components: r,
2857
- flows: s,
2675
+ flows: i,
2858
2676
  googleApiKey: n,
2859
- initialValues: u,
2860
- language: a,
2861
- onChange: f,
2862
- onSubmit: m,
2863
- validate: y,
2864
- validationMode: S
2865
- }), { FormWrapper: p, SubmitButton: H, SubmitButtonWrapper: Q, renderNode: U } = Ge({
2866
- config: c,
2867
- DefaultFormWrapper: Qe,
2868
- DefaultGroup: Ze,
2869
- DefaultSubmitButton: Tt,
2870
- DefaultSubmitButtonWrapper: Bt,
2871
- defaultInputRenderers: St,
2872
- defaultUI: kt,
2873
- formErrors: z,
2874
- formValues: C,
2875
- missingRequiredFields: q,
2876
- setFieldValue: R,
2877
- visibleNodes: K
2677
+ initialValues: c,
2678
+ language: S,
2679
+ onChange: y,
2680
+ onSubmit: p,
2681
+ theme: g,
2682
+ validate: a,
2683
+ validationMode: o
2684
+ }), { FormWrapper: A, SubmitButton: Z, SubmitButtonWrapper: Q, renderNode: I } = Je({
2685
+ config: v,
2686
+ DefaultFormWrapper: et,
2687
+ DefaultGroup: rt,
2688
+ DefaultSubmitButton: wt,
2689
+ DefaultSubmitButtonWrapper: vt,
2690
+ defaultInputRenderers: zt,
2691
+ defaultUI: Mt,
2692
+ formErrors: w,
2693
+ formValues: f,
2694
+ missingRequiredFields: u,
2695
+ setFieldValue: D,
2696
+ visibleNodes: te
2878
2697
  });
2879
- return /* @__PURE__ */ e.jsx(je, { nestedScrollEnabled: !0, style: [xe.container, B], contentContainerStyle: o, children: /* @__PURE__ */ e.jsxs(
2880
- Ue,
2698
+ return /* @__PURE__ */ e.jsx(
2699
+ be,
2881
2700
  {
2882
- value: {
2883
- flows: T,
2884
- formErrors: z,
2885
- formValues: C,
2886
- googleApiKey: c.googleApiKey,
2887
- inputNodes: b,
2888
- language: c.language,
2889
- setFieldValue: R
2890
- },
2891
- children: [
2892
- /* @__PURE__ */ e.jsxs(p, { onSubmit: g, children: [
2893
- ee.map((F) => U(F)),
2894
- x && /* @__PURE__ */ e.jsx(Q, { missingFields: q, children: /* @__PURE__ */ e.jsx(H, { onPress: g, disabled: j, isSubmitting: j, children: _("renderer.defaultSubmitButton.submit") }) })
2895
- ] }),
2896
- /* @__PURE__ */ e.jsx(t, { style: xe.poweredBy, children: "Powered by Treege" }),
2897
- k && /* @__PURE__ */ e.jsxs(l, { style: [xe.message, k.type === "success" ? xe.messageSuccess : xe.messageError], children: [
2898
- /* @__PURE__ */ e.jsx(t, { style: xe.messageText, children: k.message }),
2899
- /* @__PURE__ */ e.jsx(t, { style: xe.messageClose, onPress: i, children: _("common.close") })
2900
- ] })
2901
- ]
2701
+ nestedScrollEnabled: !0,
2702
+ style: [Ie.container, { backgroundColor: d.background }, l],
2703
+ contentContainerStyle: s,
2704
+ children: /* @__PURE__ */ e.jsxs(
2705
+ Ke,
2706
+ {
2707
+ value: {
2708
+ flows: P,
2709
+ formErrors: w,
2710
+ formValues: f,
2711
+ googleApiKey: v.googleApiKey,
2712
+ inputNodes: z,
2713
+ language: v.language,
2714
+ setFieldValue: D
2715
+ },
2716
+ children: [
2717
+ /* @__PURE__ */ e.jsxs(A, { onSubmit: b, children: [
2718
+ T.map((B) => I(B)),
2719
+ m && /* @__PURE__ */ e.jsx(Q, { missingFields: u, children: /* @__PURE__ */ e.jsx(Z, { onPress: b, disabled: j, isSubmitting: j, children: K("renderer.defaultSubmitButton.submit") }) }),
2720
+ /* @__PURE__ */ e.jsx(t, { style: [Ie.poweredBy, { color: d.textMuted }], children: "Powered by Treege" })
2721
+ ] }),
2722
+ N && /* @__PURE__ */ e.jsxs(
2723
+ x,
2724
+ {
2725
+ style: [
2726
+ Ie.message,
2727
+ {
2728
+ backgroundColor: N.type === "success" ? d.successBg : d.errorBg
2729
+ }
2730
+ ],
2731
+ children: [
2732
+ /* @__PURE__ */ e.jsx(
2733
+ t,
2734
+ {
2735
+ style: [
2736
+ Ie.messageText,
2737
+ {
2738
+ color: N.type === "success" ? d.success : d.error
2739
+ }
2740
+ ],
2741
+ children: N.message
2742
+ }
2743
+ ),
2744
+ /* @__PURE__ */ e.jsx(
2745
+ t,
2746
+ {
2747
+ style: [
2748
+ Ie.messageClose,
2749
+ {
2750
+ color: N.type === "success" ? d.success : d.error
2751
+ }
2752
+ ],
2753
+ onPress: C,
2754
+ children: K("common.close")
2755
+ }
2756
+ )
2757
+ ]
2758
+ }
2759
+ )
2760
+ ]
2761
+ }
2762
+ )
2902
2763
  }
2903
- ) });
2904
- }, xe = $.create({
2764
+ );
2765
+ }, Lt = (r) => /* @__PURE__ */ e.jsx(Qe, { theme: r.theme, storageKey: "treege-renderer-theme", children: /* @__PURE__ */ e.jsx(Ot, { ...r }) }), Ie = _.create({
2905
2766
  container: {
2906
2767
  flex: 1
2907
2768
  },
@@ -2915,65 +2776,58 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
2915
2776
  marginTop: 8,
2916
2777
  textDecorationLine: "underline"
2917
2778
  },
2918
- messageError: {
2919
- backgroundColor: "#FEE2E2"
2920
- },
2921
- messageSuccess: {
2922
- backgroundColor: "#D1FAE5"
2923
- },
2924
2779
  messageText: {
2925
2780
  fontSize: 14,
2926
2781
  fontWeight: "500"
2927
2782
  },
2928
2783
  poweredBy: {
2929
- color: "#9CA3AF",
2930
2784
  fontSize: 12,
2931
2785
  paddingVertical: 8,
2932
2786
  textAlign: "center"
2933
2787
  }
2934
2788
  });
2935
2789
  export {
2936
- rt as DefaultAddressInput,
2937
- nt as DefaultAutocompleteInput,
2938
- ot as DefaultCheckboxInput,
2939
- st as DefaultDateInput,
2940
- it as DefaultDateRangeInput,
2941
- It as DefaultDividerUI,
2942
- lt as DefaultFileInput,
2943
- at as DefaultHiddenInput,
2944
- ut as DefaultHttpInput,
2945
- gt as DefaultNumberInput,
2946
- ht as DefaultPasswordInput,
2947
- mt as DefaultRadioInput,
2790
+ st as DefaultAddressInput,
2791
+ lt as DefaultAutocompleteInput,
2792
+ it as DefaultCheckboxInput,
2793
+ at as DefaultDateInput,
2794
+ ct as DefaultDateRangeInput,
2795
+ Bt as DefaultDividerUI,
2796
+ dt as DefaultFileInput,
2797
+ ut as DefaultHiddenInput,
2798
+ mt as DefaultHttpInput,
2799
+ yt as DefaultNumberInput,
2800
+ pt as DefaultPasswordInput,
2801
+ ht as DefaultRadioInput,
2948
2802
  ft as DefaultSelectInput,
2949
- Ct as DefaultSubmitInput,
2950
- pt as DefaultSwitchInput,
2951
- xt as DefaultTextInput,
2952
- yt as DefaultTextareaInput,
2953
- bt as DefaultTimeInput,
2954
- Ft as DefaultTimeRangeInput,
2803
+ It as DefaultSubmitInput,
2804
+ bt as DefaultSwitchInput,
2805
+ Ct as DefaultTextInput,
2806
+ jt as DefaultTextareaInput,
2807
+ St as DefaultTimeInput,
2808
+ Tt as DefaultTimeRangeInput,
2955
2809
  Dt as DefaultTitleUI,
2956
- Rt as TreegeConfigProvider,
2957
- Ot as TreegeRenderer,
2958
- Wt as applyReferenceTransformation,
2959
- Ht as calculateReferenceFieldUpdates,
2960
- Lt as checkFormFieldHasValue,
2961
- $e as convertFormValuesToNamedFormat,
2962
- St as defaultInputRenderers,
2963
- kt as defaultUI,
2964
- Mt as evaluateCondition,
2965
- qt as evaluateConditions,
2966
- Vt as fileToSerializable,
2967
- Nt as filesToSerializable,
2968
- $t as findStartNode,
2969
- _t as getFlowRenderState,
2970
- Xt as getTranslatedText,
2971
- Yt as isFieldEmpty,
2972
- Gt as isStartNode,
2973
- Ut as mergeFlows,
2974
- Re as sanitize,
2975
- Ee as sanitizeHttpResponse,
2976
- Jt as serializableToFile,
2977
- Kt as useTreegeConfig,
2978
- Ye as useTreegeRenderer
2810
+ Vt as TreegeConfigProvider,
2811
+ Lt as TreegeRenderer,
2812
+ Nt as applyReferenceTransformation,
2813
+ $t as calculateReferenceFieldUpdates,
2814
+ Et as checkFormFieldHasValue,
2815
+ Ye as convertFormValuesToNamedFormat,
2816
+ zt as defaultInputRenderers,
2817
+ Mt as defaultUI,
2818
+ qt as evaluateCondition,
2819
+ _t as evaluateConditions,
2820
+ Yt as fileToSerializable,
2821
+ Gt as filesToSerializable,
2822
+ Ut as findStartNode,
2823
+ Jt as getFlowRenderState,
2824
+ rr as getTranslatedText,
2825
+ Kt as isFieldEmpty,
2826
+ Qt as isStartNode,
2827
+ Xt as mergeFlows,
2828
+ Le as sanitize,
2829
+ Re as sanitizeHttpResponse,
2830
+ Zt as serializableToFile,
2831
+ er as useTreegeConfig,
2832
+ Ue as useTreegeRenderer
2979
2833
  };