@burdenoff/microfe-healthybowl 2026.1005.2 → 2026.1007.2

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.
Files changed (101) hide show
  1. package/dist/healthybowl/components/BedLayoutGrid.js +128 -115
  2. package/dist/healthybowl/components/BedLayoutGrid.js.map +1 -1
  3. package/dist/healthybowl/components/CropPicker.js +37 -0
  4. package/dist/healthybowl/components/CropPicker.js.map +1 -0
  5. package/dist/healthybowl/components/DataTable.js +125 -108
  6. package/dist/healthybowl/components/DataTable.js.map +1 -1
  7. package/dist/healthybowl/components/FilterBar.js +9 -6
  8. package/dist/healthybowl/components/FilterBar.js.map +1 -1
  9. package/dist/healthybowl/components/PlantCatalogPicker.js +32 -0
  10. package/dist/healthybowl/components/PlantCatalogPicker.js.map +1 -0
  11. package/dist/healthybowl/components/WorkspaceRecordPicker.js +164 -0
  12. package/dist/healthybowl/components/WorkspaceRecordPicker.js.map +1 -0
  13. package/dist/healthybowl/components/index.js +3 -1
  14. package/dist/healthybowl/hooks/useCropPage.js +71 -0
  15. package/dist/healthybowl/hooks/useCropPage.js.map +1 -0
  16. package/dist/healthybowl/hooks/usePlantCatalog.js +133 -44
  17. package/dist/healthybowl/hooks/usePlantCatalog.js.map +1 -1
  18. package/dist/healthybowl/hooks/usePlantingEstimate.js +6 -6
  19. package/dist/healthybowl/hooks/usePlantingEstimate.js.map +1 -1
  20. package/dist/healthybowl/hooks/useWorkspaceRead.js +46 -0
  21. package/dist/healthybowl/hooks/useWorkspaceRead.js.map +1 -0
  22. package/dist/healthybowl/pages/HomePage.js +143 -142
  23. package/dist/healthybowl/pages/HomePage.js.map +1 -1
  24. package/dist/healthybowl/pages/analytics/ReportsPage.js +8 -8
  25. package/dist/healthybowl/pages/catalog/PlantCatalogPage.js +266 -192
  26. package/dist/healthybowl/pages/catalog/PlantCatalogPage.js.map +1 -1
  27. package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js +58 -0
  28. package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js.map +1 -0
  29. package/dist/healthybowl/pages/catalog/browsePagination.js +24 -0
  30. package/dist/healthybowl/pages/catalog/browsePagination.js.map +1 -0
  31. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +6 -6
  32. package/dist/healthybowl/pages/crops/CropDetailsPage.js +340 -348
  33. package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
  34. package/dist/healthybowl/pages/crops/CropPlanningPage.js +468 -434
  35. package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
  36. package/dist/healthybowl/pages/crops/CropsPage.js +633 -542
  37. package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
  38. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +875 -800
  39. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  40. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +459 -448
  41. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
  42. package/dist/healthybowl/pages/crops/SuccessionCropLabel.js +21 -0
  43. package/dist/healthybowl/pages/crops/SuccessionCropLabel.js.map +1 -0
  44. package/dist/healthybowl/pages/crops/planningEdit.js +30 -0
  45. package/dist/healthybowl/pages/crops/planningEdit.js.map +1 -0
  46. package/dist/healthybowl/pages/fields/FieldMapPage.js +989 -941
  47. package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
  48. package/dist/healthybowl/pages/financial/GeneralLedgerPage.js +6 -6
  49. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +7 -7
  50. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
  51. package/dist/healthybowl/pages/financial/TransactionsPage.js +541 -541
  52. package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
  53. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +10 -10
  54. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +207 -207
  55. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js.map +1 -1
  56. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +38 -38
  57. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js.map +1 -1
  58. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +15 -15
  59. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
  60. package/dist/healthybowl/pages/livestock/AnimalRegistryPage.js +4 -4
  61. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +4 -4
  62. package/dist/healthybowl/pages/livestock/FeedManagementPage.js +4 -4
  63. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +16 -16
  64. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js.map +1 -1
  65. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +4 -4
  66. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +4 -4
  67. package/dist/healthybowl/pages/market/MarketPricesPage.js +305 -305
  68. package/dist/healthybowl/pages/market/MarketPricesPage.js.map +1 -1
  69. package/dist/healthybowl/pages/network/CohortsPage.js +107 -107
  70. package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
  71. package/dist/healthybowl/pages/network/CommunityPage.js +247 -247
  72. package/dist/healthybowl/pages/network/CommunityPage.js.map +1 -1
  73. package/dist/healthybowl/pages/network/EventsPage.js +16 -16
  74. package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
  75. package/dist/healthybowl/pages/network/ExpertsPage.js +470 -470
  76. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  77. package/dist/healthybowl/pages/network/MentorsPage.js +6 -6
  78. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +8 -8
  79. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +7 -7
  80. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
  81. package/dist/healthybowl/pages/production/ProductionBatchesPage.js +7 -7
  82. package/dist/healthybowl/pages/production/RecipeManagementPage.js +5 -5
  83. package/dist/healthybowl/pages/production/ValueAddedProductsPage.js +7 -7
  84. package/dist/healthybowl/pages/soil/SoilTestsPage.js +6 -6
  85. package/dist/healthybowl/pages/soil/SoilTestsPage.js.map +1 -1
  86. package/dist/healthybowl/pages/suppliers/SuppliersPage.js +10 -10
  87. package/dist/healthybowl/pages/sustainability/CarbonCreditLedgerPage.js +6 -6
  88. package/dist/healthybowl/pages/terrace/PlantingFormModal.js +151 -131
  89. package/dist/healthybowl/pages/terrace/PlantingFormModal.js.map +1 -1
  90. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +6 -6
  91. package/dist/healthybowl/utils/cropComparison.js +1 -1
  92. package/dist/healthybowl/utils/cropComparison.js.map +1 -1
  93. package/dist/healthybowl/utils/cropPicker.js +35 -0
  94. package/dist/healthybowl/utils/cropPicker.js.map +1 -0
  95. package/dist/healthybowl/utils/plantingCapacity.js +2 -2
  96. package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
  97. package/dist/healthybowl/utils/quotaLabels.js +8 -0
  98. package/dist/healthybowl/utils/quotaLabels.js.map +1 -0
  99. package/dist/healthybowl/utils/seedRate.js +1 -8
  100. package/dist/healthybowl/utils/seedRate.js.map +1 -1
  101. package/package.json +1 -1
@@ -2,26 +2,26 @@ import { useHealthyBowl as e } from "../../context/HealthyBowlContext.js";
2
2
  import { cn as t, formatDate as n } from "../../utils/helpers.js";
3
3
  import { PageLayout as r } from "../../components/PageLayout.js";
4
4
  import { StatCard as i } from "../../components/StatCard.js";
5
- import { StatusBadge as a } from "../../components/StatusBadge.js";
6
- import { EmptyState as o } from "../../components/EmptyState.js";
5
+ import { FilterBar as a } from "../../components/FilterBar.js";
6
+ import { StatusBadge as o } from "../../components/StatusBadge.js";
7
+ import { EmptyState as s } from "../../components/EmptyState.js";
7
8
  import { ErrorState as ee } from "../../components/ErrorState.js";
8
- import { FilterBar as te } from "../../components/FilterBar.js";
9
- import { ToastContainer as ne } from "../../components/Toast.js";
10
- import { PageLoader as re } from "../../components/PageLoader.js";
11
- import { Modal as s } from "../../components/Modal.js";
12
- import { useAddHealthyBowlCommunityReactionMutation as ie, useCreateHealthyBowlCommunityChannelMutation as ae, useGetHealthyBowlCommunityChannelsQuery as oe, useGetHealthyBowlCommunityMessagesQuery as se, useGetHealthyBowlCommunityThreadQuery as c, useSendHealthyBowlCommunityMessageMutation as ce } from "../../../generated/wspace-operations.js";
13
- import { useToast as le } from "../../hooks/useToast.js";
9
+ import { ToastContainer as te } from "../../components/Toast.js";
10
+ import { PageLoader as ne } from "../../components/PageLoader.js";
11
+ import { Modal as c } from "../../components/Modal.js";
12
+ import { useAddHealthyBowlCommunityReactionMutation as re, useCreateHealthyBowlCommunityChannelMutation as ie, useGetHealthyBowlCommunityChannelsQuery as ae, useGetHealthyBowlCommunityMessagesQuery as oe, useGetHealthyBowlCommunityThreadQuery as l, useSendHealthyBowlCommunityMessageMutation as se } from "../../../generated/wspace-operations.js";
13
+ import { useToast as ce } from "../../hooks/useToast.js";
14
14
  import "../../components/index.js";
15
- import { ConversationType as ue } from "../../../generated/wspace-types.js";
16
- import { useCallback as l, useEffect as de, useMemo as u, useRef as fe, useState as d } from "react";
17
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { ArrowUpDown as pe, ChevronDown as me, Eye as he, Heart as p, MessageCircle as ge, MessageSquare as m, Plus as h, Tag as g, TrendingUp as _e } from "lucide-react";
19
- import { Fragment as ve, jsx as _, jsxs as v } from "react/jsx-runtime";
20
- import { Button as y, Select as ye, SelectContent as be, SelectItem as xe, SelectTrigger as Se, SelectValue as Ce } from "@burdenoff/fe-libs/ui";
15
+ import { ConversationType as le } from "../../../generated/wspace-types.js";
16
+ import { useCallback as u, useEffect as ue, useMemo as d, useRef as de, useState as f } from "react";
17
+ import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
+ import { ArrowUpDown as fe, ChevronDown as pe, Eye as me, Heart as m, MessageCircle as he, MessageSquare as h, Plus as g, Tag as _, TrendingUp as ge } from "lucide-react";
19
+ import { Fragment as _e, jsx as v, jsxs as y } from "react/jsx-runtime";
20
+ import { Button as b, Select as ve, SelectContent as ye, SelectItem as be, SelectTrigger as xe, SelectValue as Se } from "@burdenoff/fe-libs/ui";
21
21
  //#region src/healthybowl/pages/network/CommunityPage.tsx
22
- var b = "HealthyBowl Community", x = "👍", S = (e) => typeof e == "string" ? e : "";
22
+ var x = "HealthyBowl Community", Ce = "👍", S = (e) => typeof e == "string" ? e : "";
23
23
  function we(e, t, n) {
24
- let r = e.content ?? {}, i = r.payload ?? {}, a = e.reactions.filter((e) => e.emoji === x);
24
+ let r = e.content ?? {}, i = r.payload ?? {}, a = e.reactions.filter((e) => e.emoji === Ce);
25
25
  return {
26
26
  id: e.id,
27
27
  title: S(i.title) || S(r.text).slice(0, 60) || "Untitled",
@@ -37,75 +37,75 @@ function we(e, t, n) {
37
37
  };
38
38
  }
39
39
  var C = () => {
40
- let { t: c } = f(), { workspaceId: S, currentUser: C } = e(), w = C?.id ?? "", T = C ? [C.firstName, C.lastName].filter(Boolean).join(" ") || C.email : "", { data: E, loading: Ee, error: De, refetch: D } = oe({
40
+ let { t: l } = p(), { workspaceId: S, currentUser: C } = e(), w = C?.id ?? "", T = C ? [C.firstName, C.lastName].filter(Boolean).join(" ") || C.email : "", { data: E, loading: Ee, error: De, refetch: D } = ae({
41
41
  variables: { first: 100 },
42
42
  fetchPolicy: "cache-and-network"
43
- }), O = u(() => {
43
+ }), O = d(() => {
44
44
  let e = E?.conversations.edges ?? [];
45
- return (e.find((e) => (e.node.title ?? "") === b && e.node.workspaceId === S) ?? e.find((e) => (e.node.title ?? "") === b))?.node.id ?? null;
46
- }, [E, S]), { data: k, loading: Oe, error: ke, refetch: A } = se({
45
+ return (e.find((e) => (e.node.title ?? "") === x && e.node.workspaceId === S) ?? e.find((e) => (e.node.title ?? "") === x))?.node.id ?? null;
46
+ }, [E, S]), { data: k, loading: Oe, error: ke, refetch: A } = oe({
47
47
  variables: {
48
48
  conversationId: O ?? "",
49
49
  first: 100
50
50
  },
51
51
  skip: !O,
52
52
  fetchPolicy: "cache-and-network"
53
- }), [Ae] = ae(), [je] = ce(), [Me] = ie(), Ne = l(async () => {
53
+ }), [j] = ie(), [M] = se(), [Ae] = re(), je = u(async () => {
54
54
  await D(), O && await A();
55
55
  }, [
56
56
  D,
57
57
  A,
58
58
  O
59
- ]), j = u(() => (k?.conversation?.messages.edges ?? []).map((e) => e.node).filter((e) => !e.parentMessageId).map((e) => we(e, w, c("healthybowl.network.community.author.unknown", "Community member"))), [
59
+ ]), N = d(() => (k?.conversation?.messages.edges ?? []).map((e) => e.node).filter((e) => !e.parentMessageId).map((e) => we(e, w, l("healthybowl.network.community.author.unknown", "Community member"))), [
60
60
  k,
61
61
  w,
62
- c
63
- ]), Pe = Ee || !!O && Oe, Fe = De ?? ke, M = [
62
+ l
63
+ ]), Me = Ee || !!O && Oe, Ne = De ?? ke, Pe = [
64
64
  "All",
65
65
  "Soil Health",
66
66
  "Pest Management",
67
67
  "Irrigation",
68
68
  "Livestock",
69
69
  "General"
70
- ], N = {
71
- All: c("healthybowl.common.all", "All"),
72
- "Soil Health": c("healthybowl.network.community.categories.soilHealth", "Soil Health"),
73
- "Pest Management": c("healthybowl.network.community.categories.pestManagement", "Pest Management"),
74
- Irrigation: c("healthybowl.network.community.categories.irrigation", "Irrigation"),
75
- Livestock: c("healthybowl.network.community.categories.livestock", "Livestock"),
76
- General: c("healthybowl.network.community.categories.general", "General")
77
- }, P = {
78
- recent: c("healthybowl.network.community.sort.recent", "Most Recent"),
79
- likes: c("healthybowl.network.community.sort.likes", "Most Liked"),
80
- replies: c("healthybowl.network.community.sort.replies", "Most Replies")
81
- }, [F, I] = d(""), [L, R] = d("All"), [z, Ie] = d("recent"), [Le, B] = d(!1), [Re, ze] = d(null), [V, H] = d(null), [Be, U] = d(!1), [W, G] = d(""), [K, q] = d("General"), [J, Y] = d(""), [Ve, He] = d(""), [Ue, We] = d(!1), [Ge, Ke] = d(null), [X, Z] = d(""), [qe, Je] = d(!1), Q = fe(null), { toasts: Ye, toast: $, dismiss: Xe } = le();
82
- de(() => {
70
+ ], P = {
71
+ All: l("healthybowl.common.all", "All"),
72
+ "Soil Health": l("healthybowl.network.community.categories.soilHealth", "Soil Health"),
73
+ "Pest Management": l("healthybowl.network.community.categories.pestManagement", "Pest Management"),
74
+ Irrigation: l("healthybowl.network.community.categories.irrigation", "Irrigation"),
75
+ Livestock: l("healthybowl.network.community.categories.livestock", "Livestock"),
76
+ General: l("healthybowl.network.community.categories.general", "General")
77
+ }, F = {
78
+ recent: l("healthybowl.network.community.sort.recent", "Most Recent"),
79
+ likes: l("healthybowl.network.community.sort.likes", "Most Liked"),
80
+ replies: l("healthybowl.network.community.sort.replies", "Most Replies")
81
+ }, [I, L] = f(""), [R, z] = f("All"), [B, Fe] = f("recent"), [Ie, V] = f(!1), [Le, Re] = f(null), [H, U] = f(null), [ze, W] = f(!1), [G, K] = f(""), [q, J] = f("General"), [Y, Be] = f(""), [Ve, He] = f(""), [Ue, We] = f(!1), [Ge, Ke] = f(null), [X, Z] = f(""), [qe, Je] = f(!1), Q = de(null), { toasts: Ye, toast: $, dismiss: Xe } = ce();
82
+ ue(() => {
83
83
  let e = (e) => {
84
- Q.current && !Q.current.contains(e.target) && B(!1);
84
+ Q.current && !Q.current.contains(e.target) && V(!1);
85
85
  };
86
86
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
87
87
  }, []);
88
- let Ze = u(() => j.filter((e) => {
89
- let t = e.title.toLowerCase().includes(F.toLowerCase()) || e.author.toLowerCase().includes(F.toLowerCase()) || e.content.toLowerCase().includes(F.toLowerCase()) || e.tags.some((e) => e.toLowerCase().includes(F.toLowerCase())), n = L === "All" || e.category === L;
88
+ let Ze = d(() => N.filter((e) => {
89
+ let t = e.title.toLowerCase().includes(I.toLowerCase()) || e.author.toLowerCase().includes(I.toLowerCase()) || e.content.toLowerCase().includes(I.toLowerCase()) || e.tags.some((e) => e.toLowerCase().includes(I.toLowerCase())), n = R === "All" || e.category === R;
90
90
  return t && n;
91
91
  }).sort((e, t) => {
92
- switch (z) {
92
+ switch (B) {
93
93
  case "recent": return new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime();
94
94
  case "likes": return t.likes - e.likes;
95
95
  case "replies": return t.replies - e.replies;
96
96
  default: return 0;
97
97
  }
98
98
  }), [
99
- j,
100
- F,
101
- L,
102
- z
103
- ]), Qe = j.reduce((e, t) => e + t.replies, 0), $e = j.filter((e) => e.replies > 10).length, et = j.reduce((e, t) => e + t.likes, 0), tt = l(async () => {
99
+ N,
100
+ I,
101
+ R,
102
+ B
103
+ ]), Qe = N.reduce((e, t) => e + t.replies, 0), $e = N.filter((e) => e.replies > 10).length, et = N.reduce((e, t) => e + t.likes, 0), tt = u(async () => {
104
104
  if (O) return O;
105
- let e = (await Ae({ variables: { input: {
106
- title: b,
107
- description: c("healthybowl.network.community.channelDescription", "Discussions with fellow farmers and experts"),
108
- type: ue.Channel,
105
+ let e = (await j({ variables: { input: {
106
+ title: x,
107
+ description: l("healthybowl.network.community.channelDescription", "Discussions with fellow farmers and experts"),
108
+ type: le.Channel,
109
109
  workspaceId: S,
110
110
  participantIds: w ? [w] : []
111
111
  } } })).data?.createConversation.conversation?.id;
@@ -113,21 +113,21 @@ var C = () => {
113
113
  return await D(), e;
114
114
  }, [
115
115
  O,
116
- Ae,
116
+ j,
117
117
  D,
118
- c,
118
+ l,
119
119
  S,
120
120
  w
121
- ]), nt = l(async (e) => {
121
+ ]), nt = u(async (e) => {
122
122
  Ke(e.id);
123
123
  try {
124
- await Me({ variables: {
124
+ await Ae({ variables: {
125
125
  messageId: e.id,
126
- emoji: x
126
+ emoji: Ce
127
127
  } }), await A();
128
128
  } catch (e) {
129
129
  $({
130
- title: c("healthybowl.network.community.toast.likeFailed.title", "Could not like post"),
130
+ title: l("healthybowl.network.community.toast.likeFailed.title", "Could not like post"),
131
131
  description: e instanceof Error ? e.message : String(e),
132
132
  variant: "error"
133
133
  });
@@ -135,17 +135,17 @@ var C = () => {
135
135
  Ke(null);
136
136
  }
137
137
  }, [
138
- Me,
138
+ Ae,
139
139
  A,
140
140
  $,
141
- c
141
+ l
142
142
  ]), rt = (e) => {
143
- Z(""), H(e);
143
+ Z(""), U(e);
144
144
  }, it = async () => {
145
- if (!W.trim() || !J.trim()) {
145
+ if (!G.trim() || !Y.trim()) {
146
146
  $({
147
- title: c("healthybowl.network.community.toast.missingFields.title", "Missing Fields"),
148
- description: c("healthybowl.network.community.toast.missingFields.description", "Please fill in title and content"),
147
+ title: l("healthybowl.network.community.toast.missingFields.title", "Missing Fields"),
148
+ description: l("healthybowl.network.community.toast.missingFields.description", "Please fill in title and content"),
149
149
  variant: "warning"
150
150
  });
151
151
  return;
@@ -153,49 +153,49 @@ var C = () => {
153
153
  We(!0);
154
154
  try {
155
155
  let e = await tt(), t = Ve.split(",").map((e) => e.trim()).filter(Boolean);
156
- await je({ variables: { input: {
156
+ await M({ variables: { input: {
157
157
  conversationId: e,
158
158
  content: {
159
- text: J.trim(),
159
+ text: Y.trim(),
160
160
  payload: {
161
- title: W.trim(),
162
- category: K,
161
+ title: G.trim(),
162
+ category: q,
163
163
  tags: t,
164
164
  author: T
165
165
  }
166
166
  }
167
167
  } } }), $({
168
- title: c("healthybowl.network.community.toast.postCreated.title", "Post Created!"),
169
- description: c("healthybowl.network.community.toast.postCreated.description", "\"{{title}}\" has been published", { title: W }),
168
+ title: l("healthybowl.network.community.toast.postCreated.title", "Post Created!"),
169
+ description: l("healthybowl.network.community.toast.postCreated.description", "\"{{title}}\" has been published", { title: G }),
170
170
  variant: "success"
171
- }), U(!1), G(""), q("General"), Y(""), He(""), await Ne();
171
+ }), W(!1), K(""), J("General"), Be(""), He(""), await je();
172
172
  } catch (e) {
173
173
  $({
174
- title: c("healthybowl.common.error", "Error"),
175
- description: e instanceof Error ? e.message : c("healthybowl.network.community.toast.createFailed.description", "Failed to create post"),
174
+ title: l("healthybowl.common.error", "Error"),
175
+ description: e instanceof Error ? e.message : l("healthybowl.network.community.toast.createFailed.description", "Failed to create post"),
176
176
  variant: "error"
177
177
  });
178
178
  } finally {
179
179
  We(!1);
180
180
  }
181
181
  }, at = async () => {
182
- if (!(!V || !X.trim() || !O)) {
182
+ if (!(!H || !X.trim() || !O)) {
183
183
  Je(!0);
184
184
  try {
185
- await je({ variables: { input: {
185
+ await M({ variables: { input: {
186
186
  conversationId: O,
187
- parentMessageId: V.id,
187
+ parentMessageId: H.id,
188
188
  content: {
189
189
  text: X.trim(),
190
190
  payload: { author: T }
191
191
  }
192
192
  } } }), Z(""), await A(), $({
193
- title: c("healthybowl.network.community.toast.replyPosted.title", "Reply posted"),
193
+ title: l("healthybowl.network.community.toast.replyPosted.title", "Reply posted"),
194
194
  variant: "success"
195
195
  });
196
196
  } catch (e) {
197
197
  $({
198
- title: c("healthybowl.network.community.toast.replyFailed.title", "Could not post reply"),
198
+ title: l("healthybowl.network.community.toast.replyFailed.title", "Could not post reply"),
199
199
  description: e instanceof Error ? e.message : String(e),
200
200
  variant: "error"
201
201
  });
@@ -205,168 +205,168 @@ var C = () => {
205
205
  }
206
206
  }, ot = (e) => {
207
207
  let t = Math.floor((Date.now() - new Date(e).getTime()) / (1e3 * 60 * 60 * 24));
208
- return t === 0 ? c("healthybowl.network.community.time.today", "Today") : t === 1 ? c("healthybowl.network.community.time.yesterday", "Yesterday") : t < 7 ? c("healthybowl.network.community.time.daysAgo", "{{count}} days ago", { count: t }) : n(e);
208
+ return t === 0 ? l("healthybowl.network.community.time.today", "Today") : t === 1 ? l("healthybowl.network.community.time.yesterday", "Yesterday") : t < 7 ? l("healthybowl.network.community.time.daysAgo", "{{count}} days ago", { count: t }) : n(e);
209
209
  };
210
- return /* @__PURE__ */ v(r, {
211
- title: c("healthybowl.network.community.title", "Community"),
212
- description: c("healthybowl.network.community.description", "Join discussions with fellow farmers and experts"),
210
+ return /* @__PURE__ */ y(r, {
211
+ title: l("healthybowl.network.community.title", "Community"),
212
+ description: l("healthybowl.network.community.description", "Join discussions with fellow farmers and experts"),
213
213
  purpose: "Swap ideas, ask questions and share what's working with other farmers and experts. Farming is easier when you're not doing it alone — this is the place to learn from people who've faced the same challenges.",
214
214
  children: [
215
- /* @__PURE__ */ v("div", {
215
+ /* @__PURE__ */ y("div", {
216
216
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
217
217
  children: [
218
- /* @__PURE__ */ _(i, {
218
+ /* @__PURE__ */ v(i, {
219
219
  hero: !0,
220
- label: c("healthybowl.network.community.stats.totalPosts", "Total Posts"),
221
- value: j.length,
222
- icon: /* @__PURE__ */ _(ge, { className: "h-4 w-4" })
220
+ label: l("healthybowl.network.community.stats.totalPosts", "Total Posts"),
221
+ value: N.length,
222
+ icon: /* @__PURE__ */ v(he, { className: "h-4 w-4" })
223
223
  }),
224
- /* @__PURE__ */ _(i, {
225
- label: c("healthybowl.network.community.stats.totalReplies", "Total Replies"),
224
+ /* @__PURE__ */ v(i, {
225
+ label: l("healthybowl.network.community.stats.totalReplies", "Total Replies"),
226
226
  value: Qe,
227
- icon: /* @__PURE__ */ _(m, { className: "h-4 w-4" })
227
+ icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" })
228
228
  }),
229
- /* @__PURE__ */ _(i, {
230
- label: c("healthybowl.network.community.stats.activeDiscussions", "Active Discussions"),
229
+ /* @__PURE__ */ v(i, {
230
+ label: l("healthybowl.network.community.stats.activeDiscussions", "Active Discussions"),
231
231
  value: $e,
232
- icon: /* @__PURE__ */ _(_e, { className: "h-4 w-4" })
232
+ icon: /* @__PURE__ */ v(ge, { className: "h-4 w-4" })
233
233
  }),
234
- /* @__PURE__ */ _(i, {
235
- label: c("healthybowl.network.community.stats.totalLikes", "Total Likes"),
234
+ /* @__PURE__ */ v(i, {
235
+ label: l("healthybowl.network.community.stats.totalLikes", "Total Likes"),
236
236
  value: et,
237
- icon: /* @__PURE__ */ _(p, { className: "h-4 w-4" })
237
+ icon: /* @__PURE__ */ v(m, { className: "h-4 w-4" })
238
238
  })
239
239
  ]
240
240
  }),
241
- /* @__PURE__ */ _("div", {
241
+ /* @__PURE__ */ v("div", {
242
242
  className: "flex flex-wrap items-center gap-1.5 border-b border-border-subtle pb-3",
243
- children: M.map((e) => /* @__PURE__ */ _("button", {
243
+ children: Pe.map((e) => /* @__PURE__ */ v("button", {
244
244
  type: "button",
245
- onClick: () => R(e),
246
- className: t("rounded-full px-3 py-1.5 text-xs font-medium transition-colors", L === e ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80 hover:text-text-primary"),
247
- children: N[e] ?? e
245
+ onClick: () => z(e),
246
+ className: t("rounded-full px-3 py-1.5 text-xs font-medium transition-colors", R === e ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80 hover:text-text-primary"),
247
+ children: P[e] ?? e
248
248
  }, e))
249
249
  }),
250
- /* @__PURE__ */ _(te, {
251
- searchValue: F,
252
- onSearchChange: I,
253
- searchPlaceholder: c("healthybowl.network.community.searchPlaceholder", "Search posts, authors, or tags..."),
254
- filters: /* @__PURE__ */ v("div", {
250
+ /* @__PURE__ */ v(a, {
251
+ searchValue: I,
252
+ onSearchChange: L,
253
+ searchPlaceholder: l("healthybowl.network.community.searchPlaceholder", "Search posts, authors, or tags..."),
254
+ filters: /* @__PURE__ */ y("div", {
255
255
  ref: Q,
256
256
  className: "relative",
257
- children: [/* @__PURE__ */ v(y, {
257
+ children: [/* @__PURE__ */ y(b, {
258
258
  variant: "outline",
259
259
  size: "sm",
260
- onClick: () => B((e) => !e),
260
+ onClick: () => V((e) => !e),
261
261
  className: "w-auto",
262
262
  children: [
263
- /* @__PURE__ */ _(pe, { className: "h-3.5 w-3.5" }),
264
- P[z],
265
- /* @__PURE__ */ _(me, { className: "h-3 w-3" })
263
+ /* @__PURE__ */ v(fe, { className: "h-3.5 w-3.5" }),
264
+ F[B],
265
+ /* @__PURE__ */ v(pe, { className: "h-3 w-3" })
266
266
  ]
267
- }), Le && /* @__PURE__ */ _("div", {
267
+ }), Ie && /* @__PURE__ */ v("div", {
268
268
  className: "absolute end-0 z-10 mt-1 w-40 rounded-md border border-border-subtle bg-bg-surface py-1 shadow-lg",
269
- children: Object.keys(P).map((e) => /* @__PURE__ */ _(y, {
269
+ children: Object.keys(F).map((e) => /* @__PURE__ */ v(b, {
270
270
  variant: "ghost",
271
271
  size: "sm",
272
272
  onClick: () => {
273
- Ie(e), B(!1);
273
+ Fe(e), V(!1);
274
274
  },
275
- className: t("w-full justify-start", z === e ? "font-semibold text-primary" : "text-text-primary"),
276
- children: P[e]
275
+ className: t("w-full justify-start", B === e ? "font-semibold text-primary" : "text-text-primary"),
276
+ children: F[e]
277
277
  }, e))
278
278
  })]
279
279
  }),
280
- actions: /* @__PURE__ */ v(y, {
280
+ actions: /* @__PURE__ */ y(b, {
281
281
  size: "sm",
282
- onClick: () => U(!0),
282
+ onClick: () => W(!0),
283
283
  children: [
284
- /* @__PURE__ */ _(h, { className: "h-3.5 w-3.5" }),
284
+ /* @__PURE__ */ v(g, { className: "h-3.5 w-3.5" }),
285
285
  " ",
286
- c("healthybowl.network.community.actions.newPost", "New Post")
286
+ l("healthybowl.network.community.actions.newPost", "New Post")
287
287
  ]
288
288
  })
289
289
  }),
290
- Ze.length > 0 ? /* @__PURE__ */ _("div", {
290
+ Ze.length > 0 ? /* @__PURE__ */ v("div", {
291
291
  className: "space-y-4",
292
292
  children: Ze.map((e) => {
293
- let n = Re === e.id;
294
- return /* @__PURE__ */ v("div", {
293
+ let n = Le === e.id;
294
+ return /* @__PURE__ */ y("div", {
295
295
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 transition-colors hover:border-primary/20",
296
296
  children: [
297
- /* @__PURE__ */ v("div", {
297
+ /* @__PURE__ */ y("div", {
298
298
  className: "flex items-center gap-2",
299
299
  children: [
300
- /* @__PURE__ */ _("div", {
300
+ /* @__PURE__ */ v("div", {
301
301
  className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-xs font-semibold text-text-primary",
302
302
  children: e.author.split(" ").map((e) => e[0]).join("")
303
303
  }),
304
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
304
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
305
305
  className: "text-sm font-medium text-text-primary",
306
306
  children: e.author
307
- }), /* @__PURE__ */ _(a, {
307
+ }), /* @__PURE__ */ v(o, {
308
308
  label: e.authorRole,
309
309
  variant: "muted",
310
310
  className: "ms-2"
311
311
  })] }),
312
- /* @__PURE__ */ _("span", {
312
+ /* @__PURE__ */ v("span", {
313
313
  className: "ms-auto text-xs text-text-secondary",
314
314
  children: ot(e.createdAt)
315
315
  })
316
316
  ]
317
317
  }),
318
- /* @__PURE__ */ _("h3", {
318
+ /* @__PURE__ */ v("h3", {
319
319
  className: "mt-3 cursor-pointer text-sm font-semibold text-text-primary hover:text-primary",
320
- onClick: () => ze(n ? null : e.id),
320
+ onClick: () => Re(n ? null : e.id),
321
321
  children: e.title
322
322
  }),
323
- /* @__PURE__ */ _("p", {
323
+ /* @__PURE__ */ v("p", {
324
324
  className: t("mt-1 text-sm text-text-secondary", !n && "line-clamp-2"),
325
325
  children: e.content
326
326
  }),
327
- /* @__PURE__ */ v("div", {
327
+ /* @__PURE__ */ y("div", {
328
328
  className: "mt-3 flex flex-wrap items-center gap-2",
329
- children: [/* @__PURE__ */ _(a, {
329
+ children: [/* @__PURE__ */ v(o, {
330
330
  label: e.category,
331
331
  variant: "default"
332
- }), e.tags.map((e) => /* @__PURE__ */ v("span", {
332
+ }), e.tags.map((e) => /* @__PURE__ */ y("span", {
333
333
  className: "flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
334
334
  children: [
335
- /* @__PURE__ */ _(g, { className: "h-2.5 w-2.5" }),
335
+ /* @__PURE__ */ v(_, { className: "h-2.5 w-2.5" }),
336
336
  " ",
337
337
  e
338
338
  ]
339
339
  }, e))]
340
340
  }),
341
- /* @__PURE__ */ v("div", {
341
+ /* @__PURE__ */ y("div", {
342
342
  className: "mt-3 flex items-center gap-4",
343
343
  children: [
344
- /* @__PURE__ */ v(y, {
344
+ /* @__PURE__ */ y(b, {
345
345
  variant: "ghost",
346
346
  size: "sm",
347
347
  onClick: () => void nt(e),
348
348
  disabled: Ge === e.id,
349
- title: c("healthybowl.network.community.post.like", "Like this post"),
349
+ title: l("healthybowl.network.community.post.like", "Like this post"),
350
350
  className: t("gap-1", e.likedByMe ? "text-primary" : "text-text-secondary"),
351
- children: [/* @__PURE__ */ _(p, { className: t("h-3.5 w-3.5", e.likedByMe && "fill-current") }), e.likes]
351
+ children: [/* @__PURE__ */ v(m, { className: t("h-3.5 w-3.5", e.likedByMe && "fill-current") }), e.likes]
352
352
  }),
353
- /* @__PURE__ */ v("span", {
353
+ /* @__PURE__ */ y("span", {
354
354
  className: "flex items-center gap-1 text-xs text-text-secondary",
355
355
  children: [
356
- /* @__PURE__ */ _(m, { className: "h-3.5 w-3.5" }),
356
+ /* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" }),
357
357
  " ",
358
- c("healthybowl.network.community.post.replies", "{{count}} replies", { count: e.replies })
358
+ l("healthybowl.network.community.post.replies", "{{count}} replies", { count: e.replies })
359
359
  ]
360
360
  }),
361
- /* @__PURE__ */ v(y, {
361
+ /* @__PURE__ */ y(b, {
362
362
  variant: "ghost",
363
363
  size: "sm",
364
364
  onClick: () => rt(e),
365
365
  className: "ms-auto gap-1 font-medium text-primary",
366
366
  children: [
367
- /* @__PURE__ */ _(he, { className: "h-3.5 w-3.5" }),
367
+ /* @__PURE__ */ v(me, { className: "h-3.5 w-3.5" }),
368
368
  " ",
369
- c("healthybowl.network.community.post.viewDiscussion", "View Discussion")
369
+ l("healthybowl.network.community.post.viewDiscussion", "View Discussion")
370
370
  ]
371
371
  })
372
372
  ]
@@ -374,233 +374,233 @@ var C = () => {
374
374
  ]
375
375
  }, e.id);
376
376
  })
377
- }) : j.length === 0 ? Pe ? /* @__PURE__ */ _(re, {}) : Fe ? /* @__PURE__ */ _(ee, { onRetry: () => void Ne() }) : /* @__PURE__ */ _(o, {
377
+ }) : N.length === 0 ? Me ? /* @__PURE__ */ v(ne, {}) : Ne ? /* @__PURE__ */ v(ee, { onRetry: () => void je() }) : /* @__PURE__ */ v(s, {
378
378
  illustration: "empty-people",
379
- title: c("healthybowl.network.community.emptyState.noPosts.title", "No community posts yet"),
380
- description: c("healthybowl.network.community.emptyState.noPosts.description", "Be the first to start a discussion. Create a post to share a question or experience with the community."),
381
- action: /* @__PURE__ */ v(y, {
382
- onClick: () => U(!0),
379
+ title: l("healthybowl.network.community.emptyState.noPosts.title", "No community posts yet"),
380
+ description: l("healthybowl.network.community.emptyState.noPosts.description", "Be the first to start a discussion. Create a post to share a question or experience with the community."),
381
+ action: /* @__PURE__ */ y(b, {
382
+ onClick: () => W(!0),
383
383
  children: [
384
- /* @__PURE__ */ _(h, { className: "h-3.5 w-3.5" }),
384
+ /* @__PURE__ */ v(g, { className: "h-3.5 w-3.5" }),
385
385
  " ",
386
- c("healthybowl.network.community.actions.newPost", "New Post")
386
+ l("healthybowl.network.community.actions.newPost", "New Post")
387
387
  ]
388
388
  })
389
- }) : /* @__PURE__ */ _(o, {
389
+ }) : /* @__PURE__ */ v(s, {
390
390
  illustration: "empty-search",
391
- title: c("healthybowl.network.community.emptyState.noResults.title", "No posts found"),
392
- description: c("healthybowl.network.community.emptyState.noResults.description", "No community posts match your current filters. Try adjusting your search or category."),
393
- action: /* @__PURE__ */ _(y, {
391
+ title: l("healthybowl.network.community.emptyState.noResults.title", "No posts found"),
392
+ description: l("healthybowl.network.community.emptyState.noResults.description", "No community posts match your current filters. Try adjusting your search or category."),
393
+ action: /* @__PURE__ */ v(b, {
394
394
  onClick: () => {
395
- I(""), R("All");
395
+ L(""), z("All");
396
396
  },
397
- children: c("healthybowl.network.community.actions.clearFilters", "Clear Filters")
397
+ children: l("healthybowl.network.community.actions.clearFilters", "Clear Filters")
398
398
  })
399
399
  }),
400
- /* @__PURE__ */ _(s, {
401
- open: Be,
402
- onClose: () => U(!1),
403
- title: c("healthybowl.network.community.newPostModal.title", "Create New Post"),
404
- description: c("healthybowl.network.community.newPostModal.description", "Share your knowledge with the farming community"),
400
+ /* @__PURE__ */ v(c, {
401
+ open: ze,
402
+ onClose: () => W(!1),
403
+ title: l("healthybowl.network.community.newPostModal.title", "Create New Post"),
404
+ description: l("healthybowl.network.community.newPostModal.description", "Share your knowledge with the farming community"),
405
405
  size: "lg",
406
- footer: /* @__PURE__ */ v(ve, { children: [/* @__PURE__ */ _(y, {
406
+ footer: /* @__PURE__ */ y(_e, { children: [/* @__PURE__ */ v(b, {
407
407
  variant: "outline",
408
- onClick: () => U(!1),
409
- children: c("healthybowl.common.cancel", "Cancel")
410
- }), /* @__PURE__ */ _(y, {
408
+ onClick: () => W(!1),
409
+ children: l("healthybowl.common.cancel", "Cancel")
410
+ }), /* @__PURE__ */ v(b, {
411
411
  onClick: it,
412
412
  disabled: Ue,
413
- children: Ue ? c("healthybowl.network.community.newPostModal.publishing", "Publishing…") : c("healthybowl.network.community.newPostModal.publish", "Publish Post")
413
+ children: Ue ? l("healthybowl.network.community.newPostModal.publishing", "Publishing…") : l("healthybowl.network.community.newPostModal.publish", "Publish Post")
414
414
  })] }),
415
- children: /* @__PURE__ */ v("div", {
415
+ children: /* @__PURE__ */ y("div", {
416
416
  className: "space-y-4",
417
417
  children: [
418
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
418
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
419
419
  className: "mb-1 block text-sm font-medium text-text-primary",
420
- children: c("healthybowl.network.community.form.title.label", "Title")
421
- }), /* @__PURE__ */ _("input", {
420
+ children: l("healthybowl.network.community.form.title.label", "Title")
421
+ }), /* @__PURE__ */ v("input", {
422
422
  type: "text",
423
- value: W,
424
- onChange: (e) => G(e.target.value),
425
- placeholder: c("healthybowl.network.community.form.title.placeholder", "Enter a descriptive title..."),
423
+ value: G,
424
+ onChange: (e) => K(e.target.value),
425
+ placeholder: l("healthybowl.network.community.form.title.placeholder", "Enter a descriptive title..."),
426
426
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
427
427
  })] }),
428
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
428
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
429
429
  className: "mb-1 block text-sm font-medium text-text-primary",
430
- children: c("healthybowl.network.community.form.category.label", "Category")
431
- }), /* @__PURE__ */ v(ye, {
432
- value: K,
433
- onValueChange: q,
434
- children: [/* @__PURE__ */ _(Se, {
430
+ children: l("healthybowl.network.community.form.category.label", "Category")
431
+ }), /* @__PURE__ */ y(ve, {
432
+ value: q,
433
+ onValueChange: J,
434
+ children: [/* @__PURE__ */ v(xe, {
435
435
  className: "h-9 w-full",
436
- children: /* @__PURE__ */ _(Ce, {})
437
- }), /* @__PURE__ */ _(be, { children: M.filter((e) => e !== "All").map((e) => /* @__PURE__ */ _(xe, {
436
+ children: /* @__PURE__ */ v(Se, {})
437
+ }), /* @__PURE__ */ v(ye, { children: Pe.filter((e) => e !== "All").map((e) => /* @__PURE__ */ v(be, {
438
438
  value: e,
439
- children: N[e] ?? e
439
+ children: P[e] ?? e
440
440
  }, e)) })]
441
441
  })] }),
442
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
442
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
443
443
  className: "mb-1 block text-sm font-medium text-text-primary",
444
- children: c("healthybowl.network.community.form.content.label", "Content")
445
- }), /* @__PURE__ */ _("textarea", {
446
- value: J,
447
- onChange: (e) => Y(e.target.value),
448
- placeholder: c("healthybowl.network.community.form.content.placeholder", "Share your thoughts, questions, or advice..."),
444
+ children: l("healthybowl.network.community.form.content.label", "Content")
445
+ }), /* @__PURE__ */ v("textarea", {
446
+ value: Y,
447
+ onChange: (e) => Be(e.target.value),
448
+ placeholder: l("healthybowl.network.community.form.content.placeholder", "Share your thoughts, questions, or advice..."),
449
449
  rows: 5,
450
450
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
451
451
  })] }),
452
- /* @__PURE__ */ v("div", { children: [
453
- /* @__PURE__ */ _("label", {
452
+ /* @__PURE__ */ y("div", { children: [
453
+ /* @__PURE__ */ v("label", {
454
454
  className: "mb-1 block text-sm font-medium text-text-primary",
455
- children: c("healthybowl.network.community.form.tags.label", "Tags")
455
+ children: l("healthybowl.network.community.form.tags.label", "Tags")
456
456
  }),
457
- /* @__PURE__ */ _("input", {
457
+ /* @__PURE__ */ v("input", {
458
458
  type: "text",
459
459
  value: Ve,
460
460
  onChange: (e) => He(e.target.value),
461
- placeholder: c("healthybowl.network.community.form.tags.placeholder", "Comma-separated tags (e.g., organic, soil, irrigation)"),
461
+ placeholder: l("healthybowl.network.community.form.tags.placeholder", "Comma-separated tags (e.g., organic, soil, irrigation)"),
462
462
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
463
463
  }),
464
- /* @__PURE__ */ _("p", {
464
+ /* @__PURE__ */ v("p", {
465
465
  className: "mt-1 text-xs text-text-secondary",
466
- children: c("healthybowl.network.community.form.tags.helper", "Separate tags with commas")
466
+ children: l("healthybowl.network.community.form.tags.helper", "Separate tags with commas")
467
467
  })
468
468
  ] })
469
469
  ]
470
470
  })
471
471
  }),
472
- /* @__PURE__ */ _(s, {
473
- open: V !== null,
474
- onClose: () => H(null),
475
- title: V?.title ?? c("healthybowl.network.community.viewModal.titleFallback", "Discussion"),
476
- description: c("healthybowl.network.community.viewModal.description", "Posted by {{author}} in {{category}}", {
477
- author: V?.author ?? "",
478
- category: V?.category ?? ""
472
+ /* @__PURE__ */ v(c, {
473
+ open: H !== null,
474
+ onClose: () => U(null),
475
+ title: H?.title ?? l("healthybowl.network.community.viewModal.titleFallback", "Discussion"),
476
+ description: l("healthybowl.network.community.viewModal.description", "Posted by {{author}} in {{category}}", {
477
+ author: H?.author ?? "",
478
+ category: H?.category ?? ""
479
479
  }),
480
480
  size: "lg",
481
- footer: /* @__PURE__ */ _(y, {
481
+ footer: /* @__PURE__ */ v(b, {
482
482
  variant: "outline",
483
- onClick: () => H(null),
484
- children: c("healthybowl.common.close", "Close")
483
+ onClick: () => U(null),
484
+ children: l("healthybowl.common.close", "Close")
485
485
  }),
486
- children: V && /* @__PURE__ */ v("div", {
486
+ children: H && /* @__PURE__ */ y("div", {
487
487
  className: "space-y-4",
488
488
  children: [
489
- /* @__PURE__ */ v("div", {
489
+ /* @__PURE__ */ y("div", {
490
490
  className: "flex items-center gap-2",
491
491
  children: [
492
- /* @__PURE__ */ _("div", {
492
+ /* @__PURE__ */ v("div", {
493
493
  className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-xs font-semibold text-text-primary",
494
- children: V.author.split(" ").map((e) => e[0]).join("")
494
+ children: H.author.split(" ").map((e) => e[0]).join("")
495
495
  }),
496
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
496
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
497
497
  className: "text-sm font-medium text-text-primary",
498
- children: V.author
499
- }), /* @__PURE__ */ _(a, {
500
- label: V.authorRole,
498
+ children: H.author
499
+ }), /* @__PURE__ */ v(o, {
500
+ label: H.authorRole,
501
501
  variant: "muted",
502
502
  className: "ms-2"
503
503
  })] }),
504
- /* @__PURE__ */ _("span", {
504
+ /* @__PURE__ */ v("span", {
505
505
  className: "ms-auto text-xs text-text-secondary",
506
- children: n(V.createdAt)
506
+ children: n(H.createdAt)
507
507
  })
508
508
  ]
509
509
  }),
510
- /* @__PURE__ */ _("p", {
510
+ /* @__PURE__ */ v("p", {
511
511
  className: "text-sm text-text-primary whitespace-pre-wrap",
512
- children: V.content
512
+ children: H.content
513
513
  }),
514
- /* @__PURE__ */ v("div", {
514
+ /* @__PURE__ */ y("div", {
515
515
  className: "flex flex-wrap items-center gap-2",
516
- children: [/* @__PURE__ */ _(a, {
517
- label: V.category,
516
+ children: [/* @__PURE__ */ v(o, {
517
+ label: H.category,
518
518
  variant: "default"
519
- }), V.tags.map((e) => /* @__PURE__ */ v("span", {
519
+ }), H.tags.map((e) => /* @__PURE__ */ y("span", {
520
520
  className: "flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
521
521
  children: [
522
- /* @__PURE__ */ _(g, { className: "h-2.5 w-2.5" }),
522
+ /* @__PURE__ */ v(_, { className: "h-2.5 w-2.5" }),
523
523
  " ",
524
524
  e
525
525
  ]
526
526
  }, e))]
527
527
  }),
528
- /* @__PURE__ */ v("div", {
528
+ /* @__PURE__ */ y("div", {
529
529
  className: "flex items-center gap-4 border-t border-border-subtle pt-3 text-xs text-text-secondary",
530
- children: [/* @__PURE__ */ v("span", {
530
+ children: [/* @__PURE__ */ y("span", {
531
531
  className: "flex items-center gap-1",
532
532
  children: [
533
- /* @__PURE__ */ _(p, { className: "h-3.5 w-3.5" }),
533
+ /* @__PURE__ */ v(m, { className: "h-3.5 w-3.5" }),
534
534
  " ",
535
- c("healthybowl.network.community.viewModal.likes", "{{count}} likes", { count: V.likes })
535
+ l("healthybowl.network.community.viewModal.likes", "{{count}} likes", { count: H.likes })
536
536
  ]
537
- }), /* @__PURE__ */ v("span", {
537
+ }), /* @__PURE__ */ y("span", {
538
538
  className: "flex items-center gap-1",
539
539
  children: [
540
- /* @__PURE__ */ _(m, { className: "h-3.5 w-3.5" }),
540
+ /* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" }),
541
541
  " ",
542
- c("healthybowl.network.community.viewModal.replies", "{{count}} replies", { count: V.replies })
542
+ l("healthybowl.network.community.viewModal.replies", "{{count}} replies", { count: H.replies })
543
543
  ]
544
544
  })]
545
545
  }),
546
- /* @__PURE__ */ _(Te, { messageId: V.id }),
547
- /* @__PURE__ */ v("div", {
546
+ /* @__PURE__ */ v(Te, { messageId: H.id }),
547
+ /* @__PURE__ */ y("div", {
548
548
  className: "border-t border-border-subtle pt-3",
549
- children: [/* @__PURE__ */ _("textarea", {
549
+ children: [/* @__PURE__ */ v("textarea", {
550
550
  value: X,
551
551
  onChange: (e) => Z(e.target.value),
552
- placeholder: c("healthybowl.network.community.viewModal.replyPlaceholder", "Write a reply…"),
552
+ placeholder: l("healthybowl.network.community.viewModal.replyPlaceholder", "Write a reply…"),
553
553
  rows: 2,
554
554
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
555
- }), /* @__PURE__ */ _("div", {
555
+ }), /* @__PURE__ */ v("div", {
556
556
  className: "mt-2 flex justify-end",
557
- children: /* @__PURE__ */ _(y, {
557
+ children: /* @__PURE__ */ v(b, {
558
558
  size: "sm",
559
559
  onClick: () => void at(),
560
560
  disabled: qe || !X.trim(),
561
- children: qe ? c("healthybowl.network.community.viewModal.replying", "Posting…") : c("healthybowl.network.community.viewModal.reply", "Reply")
561
+ children: qe ? l("healthybowl.network.community.viewModal.replying", "Posting…") : l("healthybowl.network.community.viewModal.reply", "Reply")
562
562
  })
563
563
  })]
564
564
  })
565
565
  ]
566
566
  })
567
567
  }),
568
- /* @__PURE__ */ _(ne, {
568
+ /* @__PURE__ */ v(te, {
569
569
  toasts: Ye,
570
570
  onDismiss: Xe
571
571
  })
572
572
  ]
573
573
  });
574
574
  }, Te = ({ messageId: e }) => {
575
- let { t } = f(), { data: r, loading: i } = c({
575
+ let { t } = p(), { data: r, loading: i } = l({
576
576
  variables: {
577
577
  messageId: e,
578
578
  first: 100
579
579
  },
580
580
  fetchPolicy: "cache-and-network"
581
- }), a = u(() => (r?.thread.edges ?? []).map((e) => e.node), [r]);
582
- return i && a.length === 0 ? /* @__PURE__ */ _("p", {
581
+ }), a = d(() => (r?.thread.edges ?? []).map((e) => e.node), [r]);
582
+ return i && a.length === 0 ? /* @__PURE__ */ v("p", {
583
583
  className: "text-xs text-text-secondary",
584
584
  children: t("healthybowl.network.community.thread.loading", "Loading replies…")
585
- }) : a.length === 0 ? /* @__PURE__ */ _("p", {
585
+ }) : a.length === 0 ? /* @__PURE__ */ v("p", {
586
586
  className: "text-xs text-text-secondary",
587
587
  children: t("healthybowl.network.community.thread.empty", "No replies yet. Be the first to respond.")
588
- }) : /* @__PURE__ */ _("div", {
588
+ }) : /* @__PURE__ */ v("div", {
589
589
  className: "space-y-3 border-t border-border-subtle pt-3",
590
590
  children: a.map((e) => {
591
591
  let r = e.content ?? {};
592
- return /* @__PURE__ */ v("div", {
592
+ return /* @__PURE__ */ y("div", {
593
593
  className: "rounded-md bg-bg-sunken/40 p-3",
594
- children: [/* @__PURE__ */ v("div", {
594
+ children: [/* @__PURE__ */ y("div", {
595
595
  className: "flex items-center justify-between",
596
- children: [/* @__PURE__ */ _("span", {
596
+ children: [/* @__PURE__ */ v("span", {
597
597
  className: "text-xs font-medium text-text-primary",
598
598
  children: S(e.authorName) || S(r.payload?.author) || t("healthybowl.network.community.author.unknown", "Community member")
599
- }), /* @__PURE__ */ _("span", {
599
+ }), /* @__PURE__ */ v("span", {
600
600
  className: "text-[11px] text-text-secondary",
601
601
  children: n(e.createdAt)
602
602
  })]
603
- }), /* @__PURE__ */ _("p", {
603
+ }), /* @__PURE__ */ v("p", {
604
604
  className: "mt-1 whitespace-pre-wrap text-sm text-text-primary",
605
605
  children: S(r.text)
606
606
  })]