@burdenoff/microfe-comradecircle 2026.827.1 → 2026.830.1

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 (74) hide show
  1. package/dist/comradecircle/components/AvatarUploadField.js +8 -8
  2. package/dist/comradecircle/components/CircleCard.js +4 -4
  3. package/dist/comradecircle/components/CommentThread.d.ts.map +1 -1
  4. package/dist/comradecircle/components/CommentThread.js +66 -61
  5. package/dist/comradecircle/components/CommentThread.js.map +1 -1
  6. package/dist/comradecircle/components/CreateCircleDialog.d.ts.map +1 -1
  7. package/dist/comradecircle/components/CreateCircleDialog.js +89 -88
  8. package/dist/comradecircle/components/CreateCircleDialog.js.map +1 -1
  9. package/dist/comradecircle/components/CreateEventDialog.d.ts.map +1 -1
  10. package/dist/comradecircle/components/CreateEventDialog.js +28 -27
  11. package/dist/comradecircle/components/CreateEventDialog.js.map +1 -1
  12. package/dist/comradecircle/components/DraftsPanel.js +13 -13
  13. package/dist/comradecircle/components/EventCard.js +5 -5
  14. package/dist/comradecircle/components/FileImage.js +5 -5
  15. package/dist/comradecircle/components/ImageAttachments.js +21 -21
  16. package/dist/comradecircle/components/MemberIdentity.js +4 -4
  17. package/dist/comradecircle/components/MobileBottomNav.d.ts.map +1 -1
  18. package/dist/comradecircle/components/MobileBottomNav.js +37 -30
  19. package/dist/comradecircle/components/MobileBottomNav.js.map +1 -1
  20. package/dist/comradecircle/components/Pagination.d.ts.map +1 -1
  21. package/dist/comradecircle/components/Pagination.js +37 -28
  22. package/dist/comradecircle/components/Pagination.js.map +1 -1
  23. package/dist/comradecircle/components/PollCard.js +13 -13
  24. package/dist/comradecircle/components/PostCard.d.ts.map +1 -1
  25. package/dist/comradecircle/components/PostCard.js +102 -89
  26. package/dist/comradecircle/components/PostCard.js.map +1 -1
  27. package/dist/comradecircle/components/PostComposer.js +4 -4
  28. package/dist/comradecircle/components/ReactionBar.d.ts.map +1 -1
  29. package/dist/comradecircle/components/ReactionBar.js +65 -55
  30. package/dist/comradecircle/components/ReactionBar.js.map +1 -1
  31. package/dist/comradecircle/components/StateViews.d.ts.map +1 -1
  32. package/dist/comradecircle/components/StateViews.js +38 -30
  33. package/dist/comradecircle/components/StateViews.js.map +1 -1
  34. package/dist/comradecircle/components/UpcomingEvents.js +17 -17
  35. package/dist/comradecircle/hooks/index.d.ts +1 -0
  36. package/dist/comradecircle/hooks/index.d.ts.map +1 -1
  37. package/dist/comradecircle/hooks/index.js +1 -0
  38. package/dist/comradecircle/hooks/useTr.d.ts +18 -0
  39. package/dist/comradecircle/hooks/useTr.d.ts.map +1 -0
  40. package/dist/comradecircle/hooks/useTr.js +12 -0
  41. package/dist/comradecircle/hooks/useTr.js.map +1 -0
  42. package/dist/comradecircle/pages/FeedPage.d.ts.map +1 -1
  43. package/dist/comradecircle/pages/FeedPage.js +75 -62
  44. package/dist/comradecircle/pages/FeedPage.js.map +1 -1
  45. package/dist/comradecircle/pages/circles/CircleDetailPage.d.ts.map +1 -1
  46. package/dist/comradecircle/pages/circles/CircleDetailPage.js +439 -401
  47. package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
  48. package/dist/comradecircle/pages/circles/CirclesPage.d.ts.map +1 -1
  49. package/dist/comradecircle/pages/circles/CirclesPage.js +124 -117
  50. package/dist/comradecircle/pages/circles/CirclesPage.js.map +1 -1
  51. package/dist/comradecircle/pages/events/EventDetailPage.d.ts.map +1 -1
  52. package/dist/comradecircle/pages/events/EventDetailPage.js +182 -153
  53. package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
  54. package/dist/comradecircle/pages/events/EventsPage.d.ts.map +1 -1
  55. package/dist/comradecircle/pages/events/EventsPage.js +100 -91
  56. package/dist/comradecircle/pages/events/EventsPage.js.map +1 -1
  57. package/dist/comradecircle/pages/members/MemberProfilePage.d.ts.map +1 -1
  58. package/dist/comradecircle/pages/members/MemberProfilePage.js +172 -159
  59. package/dist/comradecircle/pages/members/MemberProfilePage.js.map +1 -1
  60. package/dist/comradecircle/pages/members/MembersPage.d.ts.map +1 -1
  61. package/dist/comradecircle/pages/members/MembersPage.js +103 -104
  62. package/dist/comradecircle/pages/members/MembersPage.js.map +1 -1
  63. package/dist/comradecircle/pages/monetization/MonetizationPage.d.ts.map +1 -1
  64. package/dist/comradecircle/pages/monetization/MonetizationPage.js +319 -297
  65. package/dist/comradecircle/pages/monetization/MonetizationPage.js.map +1 -1
  66. package/dist/comradecircle/pages/posts/PostThreadPage.d.ts.map +1 -1
  67. package/dist/comradecircle/pages/posts/PostThreadPage.js +37 -32
  68. package/dist/comradecircle/pages/posts/PostThreadPage.js.map +1 -1
  69. package/dist/comradecircle/pages/profile/MyProfilePage.d.ts.map +1 -1
  70. package/dist/comradecircle/pages/profile/MyProfilePage.js +182 -177
  71. package/dist/comradecircle/pages/profile/MyProfilePage.js.map +1 -1
  72. package/dist/comradecircle/utils/i18n.js +15 -0
  73. package/dist/comradecircle/utils/i18n.js.map +1 -0
  74. package/package.json +1 -1
@@ -1,209 +1,217 @@
1
1
  import { useComradeCircle as e } from "../../context/ComradeCircleContext.js";
2
2
  import "../../context/index.js";
3
- import { cn as t } from "../../utils/cn.js";
4
- import { PageLayout as n } from "../../components/PageLayout.js";
5
- import { useComCircle as r, useComCreateChannel as i, useComCreatePoll as a, useComEvents as o, useComJoinCircle as s, useComLeaveCircle as c, useComPolls as l, useComPostAddedLive as u, useComPosts as d, useComSetMemberRole as f } from "../../hooks/useComradeCircleApi.js";
6
- import { useCursorPager as p } from "../../hooks/useCursorPager.js";
3
+ import { useComCircle as t, useComCreateChannel as n, useComCreatePoll as r, useComEvents as i, useComJoinCircle as a, useComLeaveCircle as o, useComPolls as s, useComPostAddedLive as c, useComPosts as l, useComSetMemberRole as u } from "../../hooks/useComradeCircleApi.js";
4
+ import { useCursorPager as d } from "../../hooks/useCursorPager.js";
5
+ import { useTr as f } from "../../hooks/useTr.js";
7
6
  import "../../hooks/index.js";
8
- import { Avatar as m } from "../../components/Avatar.js";
9
- import { MemberIdentity as h } from "../../components/MemberIdentity.js";
10
- import { describeError as g, notify as _ } from "../../lib/toast.js";
11
- import { formatDate as v, formatEnumLabel as y, formatNumber as b } from "../../utils/formatters.js";
12
- import { PostCard as x } from "../../components/PostCard.js";
13
- import { EmptyState as S } from "../../components/EmptyState.js";
14
- import { ErrorView as C, LoadingView as w } from "../../components/StateViews.js";
15
- import { Pagination as T } from "../../components/Pagination.js";
16
- import { slugify as E } from "../../utils/slug.js";
17
- import { StatusBadge as D } from "../../components/StatusBadge.js";
7
+ import { cn as p } from "../../utils/cn.js";
8
+ import { PageLayout as m } from "../../components/PageLayout.js";
9
+ import { Avatar as h } from "../../components/Avatar.js";
10
+ import { MemberIdentity as g } from "../../components/MemberIdentity.js";
11
+ import { describeError as _, notify as v } from "../../lib/toast.js";
12
+ import { formatDate as y, formatEnumLabel as b, formatNumber as x } from "../../utils/formatters.js";
13
+ import { PostCard as S } from "../../components/PostCard.js";
14
+ import { EmptyState as C } from "../../components/EmptyState.js";
15
+ import { ErrorView as w, LoadingView as T } from "../../components/StateViews.js";
16
+ import { Pagination as E } from "../../components/Pagination.js";
17
+ import { slugify as D } from "../../utils/slug.js";
18
+ import { StatusBadge as O } from "../../components/StatusBadge.js";
18
19
  import { Tabs as ee } from "../../components/Tabs.js";
19
- import { PostComposer as te } from "../../components/PostComposer.js";
20
- import { DraftsPanel as ne } from "../../components/DraftsPanel.js";
21
- import { EventCard as re } from "../../components/EventCard.js";
22
- import { PollCard as ie } from "../../components/PollCard.js";
23
- import { CreateEventDialog as ae } from "../../components/CreateEventDialog.js";
24
- import { useMemo as O, useState as k } from "react";
25
- import { ArrowLeft as oe, BarChart3 as A, CalendarDays as se, Hash as j, Info as ce, Megaphone as M, MessageCircle as le, MessagesSquare as ue, Mic as N, Plus as P, Search as de, Users as F } from "lucide-react";
26
- import { useParams as fe } from "react-router";
27
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
28
- import { Button as z, GradientText as pe, Input as B, Label as V, ResponsiveDialog as H, ResponsiveDialogContent as U, ResponsiveDialogDescription as W, ResponsiveDialogFooter as G, ResponsiveDialogHeader as me, ResponsiveDialogTitle as K, Select as q, SelectContent as J, SelectItem as Y, SelectTrigger as X, SelectValue as Z, Switch as he, Textarea as ge } from "@burdenoff/fe-libs/ui";
20
+ import { PostComposer as k } from "../../components/PostComposer.js";
21
+ import { DraftsPanel as te } from "../../components/DraftsPanel.js";
22
+ import { EventCard as ne } from "../../components/EventCard.js";
23
+ import { PollCard as re } from "../../components/PollCard.js";
24
+ import { CreateEventDialog as ie } from "../../components/CreateEventDialog.js";
25
+ import { useMemo as A, useState as j } from "react";
26
+ import { ArrowLeft as ae, BarChart3 as M, CalendarDays as oe, Hash as N, Info as se, Megaphone as P, MessageCircle as ce, MessagesSquare as le, Mic as F, Plus as I, Search as ue, Users as L } from "lucide-react";
27
+ import { useParams as de } from "react-router";
28
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
29
+ import { Button as V, GradientText as fe, Input as H, Label as U, ResponsiveDialog as pe, ResponsiveDialogContent as me, ResponsiveDialogDescription as W, ResponsiveDialogFooter as G, ResponsiveDialogHeader as K, ResponsiveDialogTitle as q, Select as J, SelectContent as Y, SelectItem as X, SelectTrigger as Z, SelectValue as Q, Switch as he, Textarea as ge } from "@burdenoff/fe-libs/ui";
29
30
  //#region src/comradecircle/pages/circles/CircleDetailPage.tsx
30
31
  var _e = {
31
- TEXT: j,
32
- FORUM: ue,
33
- ANNOUNCEMENT: M,
34
- VOICE: N
35
- }, ve = ["OWNER", "ADMIN"], Q = [
32
+ TEXT: N,
33
+ FORUM: le,
34
+ ANNOUNCEMENT: P,
35
+ VOICE: F
36
+ }, ve = ["OWNER", "ADMIN"], $ = [
36
37
  "OWNER",
37
38
  "ADMIN",
38
39
  "MODERATOR",
39
40
  "MEMBER"
40
41
  ], ye = 15;
41
42
  function be() {
42
- let { id: t } = fe(), { currentUser: i, navigateTo: a } = e(), { data: o, isLoading: l, isError: u, refetch: d } = r(t), f = s(), p = c(), [h, v] = k("channels"), y = O(() => o?.memberships?.find((e) => e.memberId === i?.id && e.status === "ACTIVE"), [o, i]), x = !!y, S = y ? ve.includes(y.role) : !1;
43
- if (l) return /* @__PURE__ */ L(n, {
44
- title: "Circle",
45
- children: /* @__PURE__ */ L(w, { label: "Loading circle…" })
43
+ let n = f(), { id: r } = de(), { currentUser: i, navigateTo: s } = e(), { data: c, isLoading: l, isError: u, refetch: d } = t(r), p = a(), g = o(), [y, b] = j("channels"), S = A(() => c?.memberships?.find((e) => e.memberId === i?.id && e.status === "ACTIVE"), [c, i]), C = !!S, E = S ? ve.includes(S.role) : !1;
44
+ if (l) return /* @__PURE__ */ z(m, {
45
+ title: n("comradecircle.pages.circleDetail.title", "Circle"),
46
+ children: /* @__PURE__ */ z(T, { label: n("comradecircle.pages.circleDetail.loadingCircle", "Loading circle…") })
46
47
  });
47
- if (u || !o) return /* @__PURE__ */ L(n, {
48
- title: "Circle",
49
- children: /* @__PURE__ */ L(C, {
50
- title: "Circle not found",
51
- message: "This circle may have been archived or you may not have access.",
48
+ if (u || !c) return /* @__PURE__ */ z(m, {
49
+ title: n("comradecircle.pages.circleDetail.title", "Circle"),
50
+ children: /* @__PURE__ */ z(w, {
51
+ title: n("comradecircle.pages.circleDetail.notFoundTitle", "Circle not found"),
52
+ message: n("comradecircle.pages.circleDetail.notFoundMessage", "This circle may have been archived or you may not have access."),
52
53
  onRetry: () => d()
53
54
  })
54
55
  });
55
- let T = o.memberships?.filter((e) => e.status === "ACTIVE") ?? [], E = [
56
+ let D = c.memberships?.filter((e) => e.status === "ACTIVE") ?? [], k = [
56
57
  {
57
58
  value: "channels",
58
- label: "Channels",
59
- icon: /* @__PURE__ */ L(j, { className: "h-4 w-4" }),
60
- count: o.channels?.length ?? 0
59
+ label: n("comradecircle.pages.circleDetail.tabChannels", "Channels"),
60
+ icon: /* @__PURE__ */ z(N, { className: "h-4 w-4" }),
61
+ count: c.channels?.length ?? 0
61
62
  },
62
63
  {
63
64
  value: "members",
64
- label: "Members",
65
- icon: /* @__PURE__ */ L(F, { className: "h-4 w-4" }),
66
- count: T.length
65
+ label: n("comradecircle.pages.circleDetail.tabMembers", "Members"),
66
+ icon: /* @__PURE__ */ z(L, { className: "h-4 w-4" }),
67
+ count: D.length
67
68
  },
68
69
  {
69
70
  value: "events",
70
- label: "Events",
71
- icon: /* @__PURE__ */ L(se, { className: "h-4 w-4" })
71
+ label: n("comradecircle.pages.circleDetail.tabEvents", "Events"),
72
+ icon: /* @__PURE__ */ z(oe, { className: "h-4 w-4" })
72
73
  },
73
74
  {
74
75
  value: "polls",
75
- label: "Polls",
76
- icon: /* @__PURE__ */ L(A, { className: "h-4 w-4" })
76
+ label: n("comradecircle.pages.circleDetail.tabPolls", "Polls"),
77
+ icon: /* @__PURE__ */ z(M, { className: "h-4 w-4" })
77
78
  },
78
79
  {
79
80
  value: "about",
80
- label: "About",
81
- icon: /* @__PURE__ */ L(ce, { className: "h-4 w-4" })
81
+ label: n("comradecircle.pages.circleDetail.tabAbout", "About"),
82
+ icon: /* @__PURE__ */ z(se, { className: "h-4 w-4" })
82
83
  }
83
84
  ];
84
- return /* @__PURE__ */ R(n, {
85
- title: /* @__PURE__ */ R("span", {
85
+ return /* @__PURE__ */ B(m, {
86
+ title: /* @__PURE__ */ B("span", {
86
87
  className: "flex items-center gap-3",
87
- children: [/* @__PURE__ */ L(m, {
88
- name: o.name,
88
+ children: [/* @__PURE__ */ z(h, {
89
+ name: c.name,
89
90
  size: "lg",
90
- fileId: o.avatar?.id,
91
- seed: o.id,
91
+ fileId: c.avatar?.id,
92
+ seed: c.id,
92
93
  ring: !0
93
- }), /* @__PURE__ */ L(pe, {
94
+ }), /* @__PURE__ */ z(fe, {
94
95
  as: "span",
95
96
  className: "text-2xl font-semibold tracking-tight",
96
- children: o.name
97
+ children: c.name
97
98
  })]
98
99
  }),
99
- description: o.topic ?? void 0,
100
+ description: c.topic ?? void 0,
100
101
  aurora: !0,
101
- actions: /* @__PURE__ */ R("div", {
102
+ actions: /* @__PURE__ */ B("div", {
102
103
  className: "flex items-center gap-2",
103
- children: [/* @__PURE__ */ R(z, {
104
+ children: [/* @__PURE__ */ B(V, {
104
105
  variant: "ghost",
105
106
  size: "sm",
106
- onClick: () => a("circles"),
107
- children: [/* @__PURE__ */ L(oe, { className: "mr-1.5 h-4 w-4" }), " Back"]
108
- }), x ? /* @__PURE__ */ L(z, {
107
+ onClick: () => s("circles"),
108
+ children: [
109
+ /* @__PURE__ */ z(ae, { className: "mr-1.5 h-4 w-4" }),
110
+ " ",
111
+ n("common.back", "Back")
112
+ ]
113
+ }), C ? /* @__PURE__ */ z(V, {
109
114
  variant: "outline",
110
- onClick: () => p.mutateAsync(o.id).then(() => _.success("Left circle")).catch((e) => _.error("Could not leave", g(e))),
115
+ onClick: () => g.mutateAsync(c.id).then(() => v.success(n("comradecircle.pages.circleDetail.left", "Left circle"))).catch((e) => v.error(n("comradecircle.pages.circleDetail.leaveError", "Could not leave"), _(e))),
116
+ disabled: g.isPending,
117
+ children: n("comradecircle.pages.circleDetail.leave", "Leave")
118
+ }) : c.status === "ACTIVE" ? /* @__PURE__ */ z(V, {
119
+ onClick: () => p.mutateAsync(c.id).then(() => v.success(n("comradecircle.pages.circleDetail.joined", "Joined circle"))).catch((e) => v.error(n("comradecircle.pages.circleDetail.joinError", "Could not join"), _(e))),
111
120
  disabled: p.isPending,
112
- children: "Leave"
113
- }) : o.status === "ACTIVE" ? /* @__PURE__ */ L(z, {
114
- onClick: () => f.mutateAsync(o.id).then(() => _.success("Joined circle")).catch((e) => _.error("Could not join", g(e))),
115
- disabled: f.isPending,
116
- children: "Join circle"
121
+ children: n("comradecircle.pages.circleDetail.joinCircle", "Join circle")
117
122
  }) : null]
118
123
  }),
119
124
  children: [
120
- /* @__PURE__ */ R("div", {
125
+ /* @__PURE__ */ B("div", {
121
126
  className: "mb-4 flex flex-wrap items-center gap-2",
122
127
  children: [
123
- /* @__PURE__ */ L(D, { status: o.visibility }),
124
- o.status !== "ACTIVE" && /* @__PURE__ */ L(D, { status: o.status }),
125
- y && /* @__PURE__ */ L(D, { status: y.role }),
126
- /* @__PURE__ */ R("span", {
128
+ /* @__PURE__ */ z(O, { status: c.visibility }),
129
+ c.status !== "ACTIVE" && /* @__PURE__ */ z(O, { status: c.status }),
130
+ S && /* @__PURE__ */ z(O, { status: S.role }),
131
+ /* @__PURE__ */ B("span", {
127
132
  className: "inline-flex items-center gap-1 text-sm text-text-tertiary",
128
133
  children: [
129
- /* @__PURE__ */ L(F, { className: "h-4 w-4" }),
134
+ /* @__PURE__ */ z(L, { className: "h-4 w-4" }),
130
135
  " ",
131
- b(o.memberCount),
132
- " members"
136
+ n("comradecircle.pages.circleDetail.memberCount", "{{count}} members", { count: x(c.memberCount) })
133
137
  ]
134
138
  })
135
139
  ]
136
140
  }),
137
- /* @__PURE__ */ L(ee, {
138
- items: E,
139
- value: h,
140
- onChange: v,
141
+ /* @__PURE__ */ z(ee, {
142
+ items: k,
143
+ value: y,
144
+ onChange: b,
141
145
  className: "mb-5"
142
146
  }),
143
- h === "channels" && /* @__PURE__ */ L(xe, {
144
- circle: o,
145
- isMember: x,
146
- canManage: S
147
+ y === "channels" && /* @__PURE__ */ z(xe, {
148
+ circle: c,
149
+ isMember: C,
150
+ canManage: E
147
151
  }),
148
- h === "members" && /* @__PURE__ */ L(Ce, {
149
- circle: o,
150
- canManage: S
152
+ y === "members" && /* @__PURE__ */ z(Ce, {
153
+ circle: c,
154
+ canManage: E
151
155
  }),
152
- h === "events" && /* @__PURE__ */ L(we, {
153
- circle: o,
154
- isMember: x
156
+ y === "events" && /* @__PURE__ */ z(we, {
157
+ circle: c,
158
+ isMember: C
155
159
  }),
156
- h === "polls" && /* @__PURE__ */ L(Te, {
157
- circle: o,
158
- isMember: x,
159
- canManage: S
160
+ y === "polls" && /* @__PURE__ */ z(Te, {
161
+ circle: c,
162
+ isMember: C,
163
+ canManage: E
160
164
  }),
161
- h === "about" && /* @__PURE__ */ L(Ee, { circle: o })
165
+ y === "about" && /* @__PURE__ */ z(Ee, { circle: c })
162
166
  ]
163
167
  });
164
168
  }
165
- function xe({ circle: e, isMember: n, canManage: r }) {
166
- let i = O(() => [...e.channels ?? []].sort((e, t) => e.position - t.position), [e.channels]), [a, o] = k(i[0]?.id), [s, c] = k(!1), l = i.find((e) => e.id === a) ?? i[0];
167
- return i.length === 0 ? /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(S, {
168
- icon: /* @__PURE__ */ L(j, { className: "h-10 w-10" }),
169
- title: "No channels yet",
170
- description: r ? "Create the first channel to start conversations in this circle." : "This circle has no channels yet. Check back soon.",
171
- action: r ? /* @__PURE__ */ R(z, {
169
+ function xe({ circle: e, isMember: t, canManage: n }) {
170
+ let r = f(), i = A(() => [...e.channels ?? []].sort((e, t) => e.position - t.position), [e.channels]), [a, o] = j(i[0]?.id), [s, c] = j(!1), l = i.find((e) => e.id === a) ?? i[0];
171
+ return i.length === 0 ? /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(C, {
172
+ icon: /* @__PURE__ */ z(N, { className: "h-10 w-10" }),
173
+ title: r("comradecircle.pages.circleDetail.noChannelsTitle", "No channels yet"),
174
+ description: n ? r("comradecircle.pages.circleDetail.noChannelsDescriptionManager", "Create the first channel to start conversations in this circle.") : r("comradecircle.pages.circleDetail.noChannelsDescriptionMember", "This circle has no channels yet. Check back soon."),
175
+ action: n ? /* @__PURE__ */ B(V, {
172
176
  onClick: () => c(!0),
173
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New channel"]
177
+ children: [
178
+ /* @__PURE__ */ z(I, { className: "mr-1.5 h-4 w-4" }),
179
+ " ",
180
+ r("comradecircle.pages.circleDetail.newChannel", "New channel")
181
+ ]
174
182
  }) : void 0
175
- }), /* @__PURE__ */ L($, {
183
+ }), /* @__PURE__ */ z(Oe, {
176
184
  circleId: e.id,
177
185
  open: s,
178
186
  onOpenChange: c,
179
187
  onCreated: (e) => o(e.id)
180
- })] }) : /* @__PURE__ */ R("div", {
188
+ })] }) : /* @__PURE__ */ B("div", {
181
189
  className: "grid gap-5 lg:grid-cols-[220px_1fr]",
182
190
  children: [
183
- /* @__PURE__ */ R("aside", {
191
+ /* @__PURE__ */ B("aside", {
184
192
  className: "hidden lg:block",
185
- children: [/* @__PURE__ */ R("div", {
193
+ children: [/* @__PURE__ */ B("div", {
186
194
  className: "mb-2 flex items-center justify-between",
187
- children: [/* @__PURE__ */ L("h3", {
195
+ children: [/* @__PURE__ */ z("h3", {
188
196
  className: "text-xs font-semibold uppercase tracking-wide text-text-tertiary",
189
- children: "Channels"
190
- }), r && /* @__PURE__ */ L("button", {
197
+ children: r("comradecircle.pages.circleDetail.tabChannels", "Channels")
198
+ }), n && /* @__PURE__ */ z("button", {
191
199
  type: "button",
192
200
  onClick: () => c(!0),
193
- "aria-label": "New channel",
201
+ "aria-label": r("comradecircle.pages.circleDetail.newChannel", "New channel"),
194
202
  className: "rounded-md p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary",
195
- children: /* @__PURE__ */ L(P, { className: "h-4 w-4" })
203
+ children: /* @__PURE__ */ z(I, { className: "h-4 w-4" })
196
204
  })]
197
- }), /* @__PURE__ */ L("nav", {
205
+ }), /* @__PURE__ */ z("nav", {
198
206
  className: "flex flex-col gap-0.5",
199
207
  children: i.map((e) => {
200
- let n = _e[e.type], r = e.id === l?.id, i = e.type === "ANNOUNCEMENT";
201
- return /* @__PURE__ */ R("button", {
208
+ let t = _e[e.type], n = e.id === l?.id, r = e.type === "ANNOUNCEMENT";
209
+ return /* @__PURE__ */ B("button", {
202
210
  type: "button",
203
211
  onClick: () => o(e.id),
204
- "aria-current": r ? "true" : void 0,
205
- className: t("flex items-center gap-2 rounded-lg border-l-2 px-2.5 py-1.5 text-left text-sm transition-all", r ? "border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] font-medium text-text-primary shadow-sm" : i ? "border-transparent font-medium text-accent hover:bg-bg-sunken motion-safe:hover:translate-x-0.5" : "border-transparent text-text-secondary hover:bg-bg-sunken hover:text-text-primary motion-safe:hover:translate-x-0.5"),
206
- children: [/* @__PURE__ */ L(n, { className: t("h-4 w-4 shrink-0", r || i ? "text-accent" : "text-text-tertiary") }), /* @__PURE__ */ L("span", {
212
+ "aria-current": n ? "true" : void 0,
213
+ className: p("flex items-center gap-2 rounded-lg border-l-2 px-2.5 py-1.5 text-left text-sm transition-all", n ? "border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] font-medium text-text-primary shadow-sm" : r ? "border-transparent font-medium text-accent hover:bg-bg-sunken motion-safe:hover:translate-x-0.5" : "border-transparent text-text-secondary hover:bg-bg-sunken hover:text-text-primary motion-safe:hover:translate-x-0.5"),
214
+ children: [/* @__PURE__ */ z(t, { className: p("h-4 w-4 shrink-0", n || r ? "text-accent" : "text-text-tertiary") }), /* @__PURE__ */ z("span", {
207
215
  className: "truncate",
208
216
  children: e.name
209
217
  })]
@@ -211,35 +219,35 @@ function xe({ circle: e, isMember: n, canManage: r }) {
211
219
  })
212
220
  })]
213
221
  }),
214
- /* @__PURE__ */ L("div", {
222
+ /* @__PURE__ */ z("div", {
215
223
  className: "lg:hidden",
216
- children: /* @__PURE__ */ R("div", {
224
+ children: /* @__PURE__ */ B("div", {
217
225
  className: "flex items-center gap-2",
218
- children: [/* @__PURE__ */ R(q, {
226
+ children: [/* @__PURE__ */ B(J, {
219
227
  value: l?.id,
220
228
  onValueChange: o,
221
- children: [/* @__PURE__ */ L(X, { children: /* @__PURE__ */ L(Z, { placeholder: "Select a channel" }) }), /* @__PURE__ */ L(J, { children: i.map((e) => /* @__PURE__ */ R(Y, {
229
+ children: [/* @__PURE__ */ z(Z, { children: /* @__PURE__ */ z(Q, { placeholder: r("comradecircle.pages.circleDetail.selectChannel", "Select a channel") }) }), /* @__PURE__ */ z(Y, { children: i.map((e) => /* @__PURE__ */ B(X, {
222
230
  value: e.id,
223
231
  children: ["#", e.name]
224
232
  }, e.id)) })]
225
- }), r && /* @__PURE__ */ L(z, {
233
+ }), n && /* @__PURE__ */ z(V, {
226
234
  variant: "outline",
227
235
  size: "icon",
228
236
  onClick: () => c(!0),
229
- "aria-label": "New channel",
230
- children: /* @__PURE__ */ L(P, { className: "h-4 w-4" })
237
+ "aria-label": r("comradecircle.pages.circleDetail.newChannel", "New channel"),
238
+ children: /* @__PURE__ */ z(I, { className: "h-4 w-4" })
231
239
  })]
232
240
  })
233
241
  }),
234
- /* @__PURE__ */ L("div", {
242
+ /* @__PURE__ */ z("div", {
235
243
  className: "min-w-0",
236
- children: l && /* @__PURE__ */ L(Se, {
244
+ children: l && /* @__PURE__ */ z(Se, {
237
245
  channel: l,
238
- canPost: n,
239
- canManage: r
246
+ canPost: t,
247
+ canManage: n
240
248
  })
241
249
  }),
242
- /* @__PURE__ */ L($, {
250
+ /* @__PURE__ */ z(Oe, {
243
251
  circleId: e.id,
244
252
  open: s,
245
253
  onOpenChange: c,
@@ -249,175 +257,178 @@ function xe({ circle: e, isMember: n, canManage: r }) {
249
257
  });
250
258
  }
251
259
  function Se({ channel: e, canPost: t, canManage: n }) {
252
- let r = p(), [i, a] = k(!1), { data: o, isLoading: s, isError: c, refetch: l } = d({
260
+ let r = f(), i = d(), [a, o] = j(!1), { data: s, isLoading: u, isError: p, refetch: m } = l({
253
261
  channelId: e.id,
254
262
  status: "PUBLISHED",
255
263
  pagination: {
256
264
  limit: ye,
257
- cursor: r.cursor
265
+ cursor: i.cursor
258
266
  }
259
267
  });
260
- u(e.id);
261
- let f = o?.items ?? [], m = e.type === "ANNOUNCEMENT", h = e.type === "VOICE" ? !1 : m ? n : t, g = m && r.page === 0 && f.length > 0 ? f.find((e) => e.isPinned) ?? f[0] : void 0, _ = g ? f.filter((e) => e.id !== g.id) : f;
262
- return /* @__PURE__ */ R("div", {
268
+ c(e.id);
269
+ let h = s?.items ?? [], g = e.type === "ANNOUNCEMENT", _ = e.type === "VOICE" ? !1 : g ? n : t, v = g && i.page === 0 && h.length > 0 ? h.find((e) => e.isPinned) ?? h[0] : void 0, y = v ? h.filter((e) => e.id !== v.id) : h;
270
+ return /* @__PURE__ */ B("div", {
263
271
  className: "flex flex-col gap-4",
264
272
  children: [
265
- /* @__PURE__ */ R("div", {
273
+ /* @__PURE__ */ B("div", {
266
274
  className: "flex items-center gap-3",
267
275
  children: [(() => {
268
276
  let t = _e[e.type];
269
- return /* @__PURE__ */ L("span", {
277
+ return /* @__PURE__ */ z("span", {
270
278
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-accent",
271
- children: /* @__PURE__ */ L(t, { className: "h-5 w-5" })
279
+ children: /* @__PURE__ */ z(t, { className: "h-5 w-5" })
272
280
  });
273
- })(), /* @__PURE__ */ R("div", {
281
+ })(), /* @__PURE__ */ B("div", {
274
282
  className: "min-w-0",
275
- children: [/* @__PURE__ */ R("div", {
283
+ children: [/* @__PURE__ */ B("div", {
276
284
  className: "flex items-center gap-2",
277
- children: [/* @__PURE__ */ L("h2", {
285
+ children: [/* @__PURE__ */ z("h2", {
278
286
  className: "text-lg font-semibold text-text-primary",
279
287
  children: e.name
280
- }), m && /* @__PURE__ */ R("span", {
288
+ }), g && /* @__PURE__ */ B("span", {
281
289
  className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium text-accent",
282
- children: [/* @__PURE__ */ L(M, { className: "h-3 w-3" }), " Broadcast"]
290
+ children: [
291
+ /* @__PURE__ */ z(P, { className: "h-3 w-3" }),
292
+ " ",
293
+ r("comradecircle.pages.circleDetail.broadcastLabel", "Broadcast")
294
+ ]
283
295
  })]
284
- }), e.description && /* @__PURE__ */ L("p", {
296
+ }), e.description && /* @__PURE__ */ z("p", {
285
297
  className: "text-sm text-text-secondary",
286
298
  children: e.description
287
299
  })]
288
300
  })]
289
301
  }),
290
- h && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(te, {
302
+ _ && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(k, {
291
303
  channelId: e.id,
292
304
  channelName: e.name,
293
- onPosted: () => r.reset(),
294
- onDraftSaved: () => a(!0),
295
- variant: m ? "announcement" : "default"
296
- }), /* @__PURE__ */ L(ne, {
305
+ onPosted: () => i.reset(),
306
+ onDraftSaved: () => o(!0),
307
+ variant: g ? "announcement" : "default"
308
+ }), /* @__PURE__ */ z(te, {
297
309
  channelId: e.id,
298
- open: i,
299
- onOpenChange: a,
300
- variant: m ? "announcement" : "default"
310
+ open: a,
311
+ onOpenChange: o,
312
+ variant: g ? "announcement" : "default"
301
313
  })] }),
302
- m && !h && /* @__PURE__ */ R("div", {
314
+ g && !_ && /* @__PURE__ */ B("div", {
303
315
  className: "rounded-xl border border-dashed border-border-seam p-6 text-center text-sm text-text-secondary",
304
- children: [/* @__PURE__ */ L(M, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Only circle managers can post in announcement channels."]
316
+ children: [/* @__PURE__ */ z(P, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), r("comradecircle.pages.circleDetail.announcementReadOnly", "Only circle managers can post in announcement channels.")]
305
317
  }),
306
- e.type === "VOICE" && /* @__PURE__ */ R("div", {
318
+ e.type === "VOICE" && /* @__PURE__ */ B("div", {
307
319
  className: "rounded-xl border border-dashed border-border-seam p-6 text-center text-sm text-text-secondary",
308
- children: [/* @__PURE__ */ L(N, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Voice channels are for live audio. Text posting is disabled here."]
320
+ children: [/* @__PURE__ */ z(F, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), r("comradecircle.pages.circleDetail.voiceReadOnly", "Voice channels are for live audio. Text posting is disabled here.")]
309
321
  }),
310
- s ? /* @__PURE__ */ L(w, { label: "Loading posts…" }) : c ? /* @__PURE__ */ L(C, {
311
- message: "We couldn't load posts.",
312
- onRetry: () => l()
313
- }) : f.length === 0 ? /* @__PURE__ */ L(S, {
314
- icon: /* @__PURE__ */ L(le, { className: "h-9 w-9" }),
315
- title: "No posts yet",
316
- description: h ? "Be the first to post in this channel." : "Nothing has been posted here yet."
317
- }) : /* @__PURE__ */ R("div", {
322
+ u ? /* @__PURE__ */ z(T, { label: r("comradecircle.pages.circleDetail.loadingPosts", "Loading posts…") }) : p ? /* @__PURE__ */ z(w, {
323
+ message: r("comradecircle.pages.circleDetail.postsError", "We couldn't load posts."),
324
+ onRetry: () => m()
325
+ }) : h.length === 0 ? /* @__PURE__ */ z(C, {
326
+ icon: /* @__PURE__ */ z(ce, { className: "h-9 w-9" }),
327
+ title: r("comradecircle.pages.circleDetail.noPostsTitle", "No posts yet"),
328
+ description: _ ? r("comradecircle.pages.circleDetail.noPostsDescriptionCanWrite", "Be the first to post in this channel.") : r("comradecircle.pages.circleDetail.noPostsDescriptionReadOnly", "Nothing has been posted here yet.")
329
+ }) : /* @__PURE__ */ B("div", {
318
330
  className: "flex flex-col gap-4",
319
331
  children: [
320
- g && /* @__PURE__ */ R("div", {
332
+ v && /* @__PURE__ */ B("div", {
321
333
  className: "rounded-2xl border-2 border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] p-1",
322
- children: [/* @__PURE__ */ R("div", {
334
+ children: [/* @__PURE__ */ B("div", {
323
335
  className: "mb-1 flex items-center gap-1.5 px-3 pt-2 text-xs font-semibold uppercase tracking-wide text-accent",
324
- children: [/* @__PURE__ */ L(M, { className: "h-3.5 w-3.5" }), g.isPinned ? "Pinned announcement" : "Latest announcement"]
325
- }), /* @__PURE__ */ L(x, { post: g })]
336
+ children: [/* @__PURE__ */ z(P, { className: "h-3.5 w-3.5" }), v.isPinned ? r("comradecircle.pages.circleDetail.pinnedAnnouncement", "Pinned announcement") : r("comradecircle.pages.circleDetail.latestAnnouncement", "Latest announcement")]
337
+ }), /* @__PURE__ */ z(S, { post: v })]
326
338
  }),
327
- _.length > 0 && /* @__PURE__ */ R("div", {
339
+ y.length > 0 && /* @__PURE__ */ B("div", {
328
340
  className: "flex flex-col gap-4",
329
- children: [g && /* @__PURE__ */ L("p", {
341
+ children: [v && /* @__PURE__ */ z("p", {
330
342
  className: "text-xs font-semibold uppercase tracking-wide text-text-tertiary",
331
- children: "Earlier announcements"
332
- }), _.map((e) => /* @__PURE__ */ L(x, { post: e }, e.id))]
343
+ children: r("comradecircle.pages.circleDetail.earlierAnnouncements", "Earlier announcements")
344
+ }), y.map((e) => /* @__PURE__ */ z(S, { post: e }, e.id))]
333
345
  }),
334
- /* @__PURE__ */ L(T, {
335
- page: r.page,
346
+ /* @__PURE__ */ z(E, {
347
+ page: i.page,
336
348
  pageSize: ye,
337
- itemCount: f.length,
338
- hasMore: o?.pageInfo.hasMore ?? !1,
339
- onPageChange: (e) => r.onPageChange(e, o?.pageInfo.cursor)
349
+ itemCount: h.length,
350
+ hasMore: s?.pageInfo.hasMore ?? !1,
351
+ onPageChange: (e) => i.onPageChange(e, s?.pageInfo.cursor)
340
352
  })
341
353
  ]
342
354
  })
343
355
  ]
344
356
  });
345
357
  }
346
- function Ce({ circle: e, canManage: n }) {
347
- let r = f(), [i, a] = k(""), o = O(() => [...e.memberships ?? []].sort((e, t) => Q.indexOf(e.role) - Q.indexOf(t.role)), [e.memberships]), s = O(() => {
358
+ function Ce({ circle: e, canManage: t }) {
359
+ let n = f(), r = u(), [i, a] = j(""), o = A(() => [...e.memberships ?? []].sort((e, t) => $.indexOf(e.role) - $.indexOf(t.role)), [e.memberships]), s = A(() => {
348
360
  let e = i.trim().toLowerCase();
349
- return e ? o.filter((t) => y(t.role).toLowerCase().includes(e) || t.role.toLowerCase().includes(e) || y(t.status).toLowerCase().includes(e) || t.status.toLowerCase().includes(e)) : o;
361
+ return e ? o.filter((t) => b(t.role).toLowerCase().includes(e) || t.role.toLowerCase().includes(e) || b(t.status).toLowerCase().includes(e) || t.status.toLowerCase().includes(e)) : o;
350
362
  }, [o, i]);
351
- if (o.length === 0) return /* @__PURE__ */ L(S, {
352
- icon: /* @__PURE__ */ L(F, { className: "h-9 w-9" }),
353
- title: "No members yet"
363
+ if (o.length === 0) return /* @__PURE__ */ z(C, {
364
+ icon: /* @__PURE__ */ z(L, { className: "h-9 w-9" }),
365
+ title: n("comradecircle.pages.circleDetail.noMembersTitle", "No members yet")
354
366
  });
355
- let c = async (t, n) => {
367
+ let c = async (t, i) => {
356
368
  try {
357
369
  await r.mutateAsync({
358
370
  membershipId: t,
359
- role: n,
371
+ role: i,
360
372
  circleId: e.id
361
- }), _.success("Role updated");
373
+ }), v.success(n("comradecircle.pages.circleDetail.roleUpdated", "Role updated"));
362
374
  } catch (e) {
363
- _.error("Could not update role", g(e));
375
+ v.error(n("comradecircle.pages.circleDetail.roleUpdateError", "Could not update role"), _(e));
364
376
  }
365
- }, l = n ? "lg:grid-cols-[minmax(0,1fr)_120px_120px_190px]" : "lg:grid-cols-[minmax(0,1fr)_120px_120px]";
366
- return /* @__PURE__ */ R("div", {
377
+ }, l = t ? "lg:grid-cols-[minmax(0,1fr)_120px_120px_190px]" : "lg:grid-cols-[minmax(0,1fr)_120px_120px]";
378
+ return /* @__PURE__ */ B("div", {
367
379
  className: "flex flex-col gap-4",
368
- children: [/* @__PURE__ */ R("div", {
380
+ children: [/* @__PURE__ */ B("div", {
369
381
  className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
370
- children: [/* @__PURE__ */ R("div", {
382
+ children: [/* @__PURE__ */ B("div", {
371
383
  className: "relative w-full sm:max-w-xs",
372
- children: [/* @__PURE__ */ L(de, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ L(B, {
384
+ children: [/* @__PURE__ */ z(ue, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ z(H, {
373
385
  value: i,
374
386
  onChange: (e) => a(e.target.value),
375
- placeholder: "Filter by role or status…",
387
+ placeholder: n("comradecircle.pages.circleDetail.filterMembersPlaceholder", "Filter by role or status…"),
376
388
  className: "pl-9",
377
- "aria-label": "Filter members by role or status"
389
+ "aria-label": n("comradecircle.pages.circleDetail.filterMembersAriaLabel", "Filter members by role or status")
378
390
  })]
379
- }), /* @__PURE__ */ L("span", {
391
+ }), /* @__PURE__ */ z("span", {
380
392
  className: "text-sm text-text-tertiary",
381
- children: s.length === o.length ? `${b(o.length)} member${o.length === 1 ? "" : "s"}` : `${b(s.length)} of ${b(o.length)}`
393
+ children: s.length === o.length ? n("comradecircle.pages.circleDetail.memberCount", "{{count}} members", { count: x(o.length) }) : n("comradecircle.pages.circleDetail.filteredMemberCount", "{{filtered}} of {{total}}", {
394
+ filtered: x(s.length),
395
+ total: x(o.length)
396
+ })
382
397
  })]
383
- }), /* @__PURE__ */ R("div", {
398
+ }), /* @__PURE__ */ B("div", {
384
399
  className: "overflow-hidden rounded-2xl border border-border-seam bg-bg-surface",
385
- children: [/* @__PURE__ */ R("div", {
386
- className: t("hidden border-b border-border-seam px-5 py-3 text-xs font-semibold uppercase tracking-wide text-text-tertiary lg:grid lg:items-center lg:gap-4", l),
400
+ children: [/* @__PURE__ */ B("div", {
401
+ className: p("hidden border-b border-border-seam px-5 py-3 text-xs font-semibold uppercase tracking-wide text-text-tertiary lg:grid lg:items-center lg:gap-4", l),
387
402
  children: [
388
- /* @__PURE__ */ L("span", { children: "Member" }),
389
- /* @__PURE__ */ L("span", { children: "Status" }),
390
- /* @__PURE__ */ L("span", { children: "Role" }),
391
- n && /* @__PURE__ */ L("span", { children: "Manage role" })
403
+ /* @__PURE__ */ z("span", { children: n("comradecircle.pages.circleDetail.memberColumn", "Member") }),
404
+ /* @__PURE__ */ z("span", { children: n("comradecircle.pages.circleDetail.statusColumn", "Status") }),
405
+ /* @__PURE__ */ z("span", { children: n("comradecircle.pages.circleDetail.roleColumn", "Role") }),
406
+ t && /* @__PURE__ */ z("span", { children: n("comradecircle.pages.circleDetail.manageRoleColumn", "Manage role") })
392
407
  ]
393
- }), s.length === 0 ? /* @__PURE__ */ R("div", {
408
+ }), s.length === 0 ? /* @__PURE__ */ z("div", {
394
409
  className: "px-5 py-10 text-center text-sm text-text-secondary",
395
- children: [
396
- "No members match “",
397
- i.trim(),
398
- "”."
399
- ]
400
- }) : s.map((e) => /* @__PURE__ */ R("div", {
401
- className: t("flex flex-col gap-3 border-b border-border-seam px-5 py-4 last:border-b-0 motion-safe:transition-colors hover:bg-bg-sunken/60 lg:grid lg:items-center lg:gap-4", l),
402
- children: [/* @__PURE__ */ L(h, {
410
+ children: n("comradecircle.pages.circleDetail.noFilterMatches", "No members match \"{{query}}\".", { query: i.trim() })
411
+ }) : s.map((e) => /* @__PURE__ */ B("div", {
412
+ className: p("flex flex-col gap-3 border-b border-border-seam px-5 py-4 last:border-b-0 motion-safe:transition-colors hover:bg-bg-sunken/60 lg:grid lg:items-center lg:gap-4", l),
413
+ children: [/* @__PURE__ */ z(g, {
403
414
  memberId: e.memberId,
404
415
  variant: "row",
405
416
  size: "md",
406
417
  showPresence: !0
407
- }), /* @__PURE__ */ R("div", {
418
+ }), /* @__PURE__ */ B("div", {
408
419
  className: "flex flex-wrap items-center gap-2 lg:contents",
409
420
  children: [
410
- /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(D, { status: e.status }) }),
411
- /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(D, { status: e.role }) }),
412
- n && /* @__PURE__ */ R(q, {
421
+ /* @__PURE__ */ z("div", { children: /* @__PURE__ */ z(O, { status: e.status }) }),
422
+ /* @__PURE__ */ z("div", { children: /* @__PURE__ */ z(O, { status: e.role }) }),
423
+ t && /* @__PURE__ */ B(J, {
413
424
  value: e.role,
414
425
  onValueChange: (t) => c(e.id, t),
415
- children: [/* @__PURE__ */ L(X, {
426
+ children: [/* @__PURE__ */ z(Z, {
416
427
  className: "h-9 w-40 lg:w-full",
417
- children: /* @__PURE__ */ L(Z, {})
418
- }), /* @__PURE__ */ L(J, { children: Q.map((e) => /* @__PURE__ */ L(Y, {
428
+ children: /* @__PURE__ */ z(Q, {})
429
+ }), /* @__PURE__ */ z(Y, { children: $.map((e) => /* @__PURE__ */ z(X, {
419
430
  value: e,
420
- children: y(e)
431
+ children: b(e)
421
432
  }, e)) })]
422
433
  })
423
434
  ]
@@ -427,120 +438,143 @@ function Ce({ circle: e, canManage: n }) {
427
438
  });
428
439
  }
429
440
  function we({ circle: t, isMember: n }) {
430
- let { navigateTo: r } = e(), { data: i, isLoading: a, isError: s, refetch: c } = o({ circleId: t.id }), [l, u] = k(!1), d = i?.items ?? [];
431
- return /* @__PURE__ */ R("div", { children: [
432
- /* @__PURE__ */ L("div", {
441
+ let r = f(), { navigateTo: a } = e(), { data: o, isLoading: s, isError: c, refetch: l } = i({ circleId: t.id }), [u, d] = j(!1), p = o?.items ?? [];
442
+ return /* @__PURE__ */ B("div", { children: [
443
+ /* @__PURE__ */ z("div", {
433
444
  className: "mb-4 flex items-center justify-end",
434
- children: n && /* @__PURE__ */ R(z, {
435
- onClick: () => u(!0),
436
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New event"]
445
+ children: n && /* @__PURE__ */ B(V, {
446
+ onClick: () => d(!0),
447
+ children: [
448
+ /* @__PURE__ */ z(I, { className: "mr-1.5 h-4 w-4" }),
449
+ " ",
450
+ r("comradecircle.pages.circleDetail.newEvent", "New event")
451
+ ]
437
452
  })
438
453
  }),
439
- a ? /* @__PURE__ */ L(w, { label: "Loading events…" }) : s ? /* @__PURE__ */ L(C, { onRetry: () => c() }) : d.length === 0 ? /* @__PURE__ */ L(S, {
440
- icon: /* @__PURE__ */ L(se, { className: "h-9 w-9" }),
441
- title: "No events scheduled",
442
- description: n ? "Schedule the first event for this circle." : "No upcoming events.",
443
- action: n ? /* @__PURE__ */ R(z, {
444
- onClick: () => u(!0),
445
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New event"]
454
+ s ? /* @__PURE__ */ z(T, { label: r("comradecircle.pages.circleDetail.loadingEvents", "Loading events…") }) : c ? /* @__PURE__ */ z(w, {
455
+ message: r("comradecircle.pages.circleDetail.eventsError", "We couldn't load events."),
456
+ onRetry: () => l()
457
+ }) : p.length === 0 ? /* @__PURE__ */ z(C, {
458
+ icon: /* @__PURE__ */ z(oe, { className: "h-9 w-9" }),
459
+ title: r("comradecircle.pages.circleDetail.noEventsTitle", "No events scheduled"),
460
+ description: n ? r("comradecircle.pages.circleDetail.noEventsDescriptionMember", "Schedule the first event for this circle.") : r("comradecircle.pages.circleDetail.noEventsDescriptionNonMember", "No upcoming events."),
461
+ action: n ? /* @__PURE__ */ B(V, {
462
+ onClick: () => d(!0),
463
+ children: [
464
+ /* @__PURE__ */ z(I, { className: "mr-1.5 h-4 w-4" }),
465
+ " ",
466
+ r("comradecircle.pages.circleDetail.newEvent", "New event")
467
+ ]
446
468
  }) : void 0
447
- }) : /* @__PURE__ */ L("div", {
469
+ }) : /* @__PURE__ */ z("div", {
448
470
  className: "grid gap-4 md:grid-cols-2",
449
- children: d.map((e) => /* @__PURE__ */ L(re, {
471
+ children: p.map((e) => /* @__PURE__ */ z(ne, {
450
472
  event: e,
451
- onOpen: () => r(`events/${e.id}`)
473
+ onOpen: () => a(`events/${e.id}`)
452
474
  }, e.id))
453
475
  }),
454
- /* @__PURE__ */ L(ae, {
476
+ /* @__PURE__ */ z(ie, {
455
477
  circleId: t.id,
456
- open: l,
457
- onOpenChange: u
478
+ open: u,
479
+ onOpenChange: d
458
480
  })
459
481
  ] });
460
482
  }
461
483
  function Te({ circle: e, isMember: t, canManage: n }) {
462
- let { data: r, isLoading: i, isError: a, refetch: o } = l(e.id), [s, c] = k(!1);
463
- return /* @__PURE__ */ R("div", { children: [
464
- /* @__PURE__ */ L("div", {
484
+ let r = f(), { data: i, isLoading: a, isError: o, refetch: c } = s(e.id), [l, u] = j(!1);
485
+ return /* @__PURE__ */ B("div", { children: [
486
+ /* @__PURE__ */ z("div", {
465
487
  className: "mb-4 flex items-center justify-end",
466
- children: t && /* @__PURE__ */ R(z, {
467
- onClick: () => c(!0),
468
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New poll"]
488
+ children: t && /* @__PURE__ */ B(V, {
489
+ onClick: () => u(!0),
490
+ children: [
491
+ /* @__PURE__ */ z(I, { className: "mr-1.5 h-4 w-4" }),
492
+ " ",
493
+ r("comradecircle.pages.circleDetail.newPoll", "New poll")
494
+ ]
469
495
  })
470
496
  }),
471
- i ? /* @__PURE__ */ L(w, { label: "Loading polls…" }) : a ? /* @__PURE__ */ L(C, { onRetry: () => o() }) : (r ?? []).length === 0 ? /* @__PURE__ */ L(S, {
472
- icon: /* @__PURE__ */ L(A, { className: "h-9 w-9" }),
473
- title: "No polls yet",
474
- description: t ? "Ask the circle a question with a poll." : "No polls have been created.",
475
- action: t ? /* @__PURE__ */ R(z, {
476
- onClick: () => c(!0),
477
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New poll"]
497
+ a ? /* @__PURE__ */ z(T, { label: r("comradecircle.pages.circleDetail.loadingPolls", "Loading polls…") }) : o ? /* @__PURE__ */ z(w, {
498
+ message: r("comradecircle.pages.circleDetail.pollsError", "We couldn't load polls."),
499
+ onRetry: () => c()
500
+ }) : (i ?? []).length === 0 ? /* @__PURE__ */ z(C, {
501
+ icon: /* @__PURE__ */ z(M, { className: "h-9 w-9" }),
502
+ title: r("comradecircle.pages.circleDetail.noPollsTitle", "No polls yet"),
503
+ description: t ? r("comradecircle.pages.circleDetail.noPollsDescriptionMember", "Ask the circle a question with a poll.") : r("comradecircle.pages.circleDetail.noPollsDescriptionNonMember", "No polls have been created."),
504
+ action: t ? /* @__PURE__ */ B(V, {
505
+ onClick: () => u(!0),
506
+ children: [
507
+ /* @__PURE__ */ z(I, { className: "mr-1.5 h-4 w-4" }),
508
+ " ",
509
+ r("comradecircle.pages.circleDetail.newPoll", "New poll")
510
+ ]
478
511
  }) : void 0
479
- }) : /* @__PURE__ */ L("div", {
512
+ }) : /* @__PURE__ */ z("div", {
480
513
  className: "mx-auto flex max-w-2xl flex-col gap-4",
481
- children: (r ?? []).map((e) => /* @__PURE__ */ L(ie, {
514
+ children: (i ?? []).map((e) => /* @__PURE__ */ z(re, {
482
515
  poll: e,
483
516
  canManage: n
484
517
  }, e.id))
485
518
  }),
486
- /* @__PURE__ */ L(Oe, {
519
+ /* @__PURE__ */ z(ke, {
487
520
  circleId: e.id,
488
- open: s,
489
- onOpenChange: c
521
+ open: l,
522
+ onOpenChange: u
490
523
  })
491
524
  ] });
492
525
  }
493
526
  function Ee({ circle: e }) {
494
- return /* @__PURE__ */ L("div", {
527
+ let t = f();
528
+ return /* @__PURE__ */ z("div", {
495
529
  className: "mx-auto max-w-2xl",
496
- children: /* @__PURE__ */ R("div", {
530
+ children: /* @__PURE__ */ B("div", {
497
531
  className: "rounded-2xl border border-border-seam bg-bg-surface p-6",
498
532
  children: [
499
- /* @__PURE__ */ L("h2", {
533
+ /* @__PURE__ */ z("h2", {
500
534
  className: "text-lg font-semibold text-text-primary",
501
- children: "About this circle"
535
+ children: t("comradecircle.pages.circleDetail.aboutTitle", "About this circle")
502
536
  }),
503
- /* @__PURE__ */ L("p", {
537
+ /* @__PURE__ */ z("p", {
504
538
  className: "mt-2 whitespace-pre-wrap text-sm text-text-secondary",
505
- children: e.description || "No description provided."
539
+ children: e.description || t("comradecircle.pages.circleDetail.noDescription", "No description provided.")
506
540
  }),
507
- e.tags.length > 0 && /* @__PURE__ */ L("div", {
541
+ e.tags.length > 0 && /* @__PURE__ */ z("div", {
508
542
  className: "mt-4 flex flex-wrap gap-1.5",
509
- children: e.tags.map((e) => /* @__PURE__ */ R("span", {
543
+ children: e.tags.map((e) => /* @__PURE__ */ B("span", {
510
544
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
511
545
  children: ["#", e]
512
546
  }, e))
513
547
  }),
514
- /* @__PURE__ */ R("dl", {
548
+ /* @__PURE__ */ B("dl", {
515
549
  className: "mt-6 grid grid-cols-2 gap-4 text-sm",
516
550
  children: [
517
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
551
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("dt", {
518
552
  className: "text-text-tertiary",
519
- children: "Visibility"
520
- }), /* @__PURE__ */ L("dd", {
553
+ children: t("comradecircle.pages.circleDetail.visibilityLabel", "Visibility")
554
+ }), /* @__PURE__ */ z("dd", {
521
555
  className: "mt-1 text-text-primary",
522
- children: y(e.visibility)
556
+ children: b(e.visibility)
523
557
  })] }),
524
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
558
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("dt", {
525
559
  className: "text-text-tertiary",
526
- children: "Status"
527
- }), /* @__PURE__ */ L("dd", {
560
+ children: t("comradecircle.pages.circleDetail.statusLabel", "Status")
561
+ }), /* @__PURE__ */ z("dd", {
528
562
  className: "mt-1 text-text-primary",
529
- children: y(e.status)
563
+ children: b(e.status)
530
564
  })] }),
531
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
565
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("dt", {
532
566
  className: "text-text-tertiary",
533
- children: "Members"
534
- }), /* @__PURE__ */ L("dd", {
567
+ children: t("comradecircle.pages.circleDetail.membersLabel", "Members")
568
+ }), /* @__PURE__ */ z("dd", {
535
569
  className: "mt-1 text-text-primary",
536
- children: b(e.memberCount)
570
+ children: x(e.memberCount)
537
571
  })] }),
538
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
572
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("dt", {
539
573
  className: "text-text-tertiary",
540
- children: "Created"
541
- }), /* @__PURE__ */ L("dd", {
574
+ children: t("comradecircle.pages.circleDetail.createdLabel", "Created")
575
+ }), /* @__PURE__ */ z("dd", {
542
576
  className: "mt-1 text-text-primary",
543
- children: v(e.createdAt)
577
+ children: y(e.createdAt)
544
578
  })] })
545
579
  ]
546
580
  })
@@ -554,235 +588,239 @@ var De = [
554
588
  "ANNOUNCEMENT",
555
589
  "VOICE"
556
590
  ];
557
- function $({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
558
- let a = i(), [o, s] = k(""), [c, l] = k(""), [u, d] = k("TEXT"), [f, p] = k(null);
559
- return /* @__PURE__ */ L(H, {
591
+ function Oe({ circleId: e, open: t, onOpenChange: r, onCreated: i }) {
592
+ let a = f(), o = n(), [s, c] = j(""), [l, u] = j(""), [d, p] = j("TEXT"), [m, h] = j(null);
593
+ return /* @__PURE__ */ z(pe, {
560
594
  open: t,
561
- onOpenChange: n,
562
- children: /* @__PURE__ */ R(U, {
595
+ onOpenChange: r,
596
+ children: /* @__PURE__ */ B(me, {
563
597
  className: "sm:max-w-md",
564
598
  children: [
565
- /* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(K, { children: "Create a channel" }), /* @__PURE__ */ L(W, { children: "Channels organise conversations by topic or format." })] }),
566
- /* @__PURE__ */ R("div", {
599
+ /* @__PURE__ */ B(K, { children: [/* @__PURE__ */ z(q, { children: a("comradecircle.pages.circleDetail.createChannelTitle", "Create a channel") }), /* @__PURE__ */ z(W, { children: a("comradecircle.pages.circleDetail.createChannelDescription", "Channels organise conversations by topic or format.") })] }),
600
+ /* @__PURE__ */ B("div", {
567
601
  className: "flex flex-col gap-4 py-2",
568
602
  children: [
569
- /* @__PURE__ */ R("div", {
603
+ /* @__PURE__ */ B("div", {
570
604
  className: "grid gap-1.5",
571
- children: [/* @__PURE__ */ L(V, {
605
+ children: [/* @__PURE__ */ z(U, {
572
606
  htmlFor: "channel-name",
573
- children: "Name"
574
- }), /* @__PURE__ */ L(B, {
607
+ children: a("comradecircle.pages.circleDetail.channelNameLabel", "Name")
608
+ }), /* @__PURE__ */ z(H, {
575
609
  id: "channel-name",
576
- value: o,
577
- onChange: (e) => s(e.target.value),
578
- placeholder: "general"
610
+ value: s,
611
+ onChange: (e) => c(e.target.value),
612
+ placeholder: a("comradecircle.pages.circleDetail.channelNamePlaceholder", "general")
579
613
  })]
580
614
  }),
581
- /* @__PURE__ */ R("div", {
615
+ /* @__PURE__ */ B("div", {
582
616
  className: "grid gap-1.5",
583
- children: [/* @__PURE__ */ L(V, { children: "Type" }), /* @__PURE__ */ R(q, {
584
- value: u,
585
- onValueChange: (e) => d(e),
586
- children: [/* @__PURE__ */ L(X, { children: /* @__PURE__ */ L(Z, {}) }), /* @__PURE__ */ L(J, { children: De.map((e) => /* @__PURE__ */ L(Y, {
617
+ children: [/* @__PURE__ */ z(U, { children: a("comradecircle.pages.circleDetail.channelTypeLabel", "Type") }), /* @__PURE__ */ B(J, {
618
+ value: d,
619
+ onValueChange: (e) => p(e),
620
+ children: [/* @__PURE__ */ z(Z, { children: /* @__PURE__ */ z(Q, {}) }), /* @__PURE__ */ z(Y, { children: De.map((e) => /* @__PURE__ */ z(X, {
587
621
  value: e,
588
- children: y(e)
622
+ children: b(e)
589
623
  }, e)) })]
590
624
  })]
591
625
  }),
592
- /* @__PURE__ */ R("div", {
626
+ /* @__PURE__ */ B("div", {
593
627
  className: "grid gap-1.5",
594
- children: [/* @__PURE__ */ L(V, {
628
+ children: [/* @__PURE__ */ z(U, {
595
629
  htmlFor: "channel-desc",
596
- children: "Description"
597
- }), /* @__PURE__ */ L(ge, {
630
+ children: a("comradecircle.pages.circleDetail.channelDescriptionLabel", "Description")
631
+ }), /* @__PURE__ */ z(ge, {
598
632
  id: "channel-desc",
599
- value: c,
600
- onChange: (e) => l(e.target.value),
633
+ value: l,
634
+ onChange: (e) => u(e.target.value),
601
635
  rows: 2
602
636
  })]
603
637
  }),
604
- f && /* @__PURE__ */ L("p", {
638
+ m && /* @__PURE__ */ z("p", {
605
639
  className: "text-sm text-status-error-text",
606
- children: f
640
+ children: m
607
641
  })
608
642
  ]
609
643
  }),
610
- /* @__PURE__ */ R(G, { children: [/* @__PURE__ */ L(z, {
644
+ /* @__PURE__ */ B(G, { children: [/* @__PURE__ */ z(V, {
611
645
  variant: "outline",
612
- onClick: () => n(!1),
613
- children: "Cancel"
614
- }), /* @__PURE__ */ L(z, {
646
+ onClick: () => r(!1),
647
+ children: a("common.cancel", "Cancel")
648
+ }), /* @__PURE__ */ z(V, {
615
649
  onClick: async () => {
616
- if (!o.trim()) {
617
- p("Channel name is required.");
650
+ if (!s.trim()) {
651
+ h(a("comradecircle.pages.circleDetail.channelNameRequired", "Channel name is required."));
618
652
  return;
619
653
  }
620
654
  try {
621
- let t = await a.mutateAsync({
655
+ let t = await o.mutateAsync({
622
656
  circleId: e,
623
- name: o.trim(),
624
- slug: E(o),
625
- description: c.trim() || null,
626
- type: u
657
+ name: s.trim(),
658
+ slug: D(s),
659
+ description: l.trim() || null,
660
+ type: d
627
661
  });
628
- _.success("Channel created", `#${t.name}`), n(!1), s(""), l(""), d("TEXT"), p(null), r?.(t);
662
+ v.success(a("comradecircle.pages.circleDetail.channelCreated", "Channel created"), `#${t.name}`), r(!1), c(""), u(""), p("TEXT"), h(null), i?.(t);
629
663
  } catch (e) {
630
- p(g(e));
664
+ h(_(e));
631
665
  }
632
666
  },
633
- disabled: a.isPending,
634
- children: "Create channel"
667
+ disabled: o.isPending,
668
+ children: a("comradecircle.pages.circleDetail.createChannelAction", "Create channel")
635
669
  })] })
636
670
  ]
637
671
  })
638
672
  });
639
673
  }
640
- function Oe({ circleId: e, open: t, onOpenChange: n }) {
641
- let r = a(), [i, o] = k(""), [s, c] = k(["", ""]), [l, u] = k(!1), [d, f] = k(!1), [p, m] = k(""), [h, v] = k(null), y = O(() => {
674
+ function ke({ circleId: e, open: t, onOpenChange: n }) {
675
+ let i = f(), a = r(), [o, s] = j(""), [c, l] = j(["", ""]), [u, d] = j(!1), [p, m] = j(!1), [h, g] = j(""), [y, b] = j(null), x = A(() => {
642
676
  let e = /* @__PURE__ */ new Date();
643
677
  return e.setMinutes(e.getMinutes() - e.getTimezoneOffset()), e.toISOString().slice(0, 16);
644
- }, []), b = () => {
645
- o(""), c(["", ""]), u(!1), f(!1), m(""), v(null);
678
+ }, []), S = () => {
679
+ s(""), l(["", ""]), d(!1), m(!1), g(""), b(null);
646
680
  };
647
- return /* @__PURE__ */ L(H, {
681
+ return /* @__PURE__ */ z(pe, {
648
682
  open: t,
649
683
  onOpenChange: n,
650
- children: /* @__PURE__ */ R(U, {
684
+ children: /* @__PURE__ */ B(me, {
651
685
  className: "sm:max-w-md",
652
686
  children: [
653
- /* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(K, { children: "Create a poll" }), /* @__PURE__ */ L(W, { children: "Gather the circle's opinion." })] }),
654
- /* @__PURE__ */ R("div", {
687
+ /* @__PURE__ */ B(K, { children: [/* @__PURE__ */ z(q, { children: i("comradecircle.pages.circleDetail.createPollTitle", "Create a poll") }), /* @__PURE__ */ z(W, { children: i("comradecircle.pages.circleDetail.createPollDescription", "Gather the circle's opinion.") })] }),
688
+ /* @__PURE__ */ B("div", {
655
689
  className: "flex flex-col gap-4 py-2",
656
690
  children: [
657
- /* @__PURE__ */ R("div", {
691
+ /* @__PURE__ */ B("div", {
658
692
  className: "grid gap-1.5",
659
- children: [/* @__PURE__ */ L(V, {
693
+ children: [/* @__PURE__ */ z(U, {
660
694
  htmlFor: "poll-q",
661
- children: "Question"
662
- }), /* @__PURE__ */ L(B, {
695
+ children: i("comradecircle.pages.circleDetail.pollQuestionLabel", "Question")
696
+ }), /* @__PURE__ */ z(H, {
663
697
  id: "poll-q",
664
- value: i,
665
- onChange: (e) => o(e.target.value),
666
- placeholder: "What should we build next?"
698
+ value: o,
699
+ onChange: (e) => s(e.target.value),
700
+ placeholder: i("comradecircle.pages.circleDetail.pollQuestionPlaceholder", "What should we build next?")
667
701
  })]
668
702
  }),
669
- /* @__PURE__ */ R("div", {
703
+ /* @__PURE__ */ B("div", {
670
704
  className: "grid gap-1.5",
671
- children: [/* @__PURE__ */ L(V, { children: "Options" }), /* @__PURE__ */ R("div", {
705
+ children: [/* @__PURE__ */ z(U, { children: i("comradecircle.pages.circleDetail.pollOptionsLabel", "Options") }), /* @__PURE__ */ B("div", {
672
706
  className: "flex flex-col gap-2",
673
- children: [s.map((e, t) => /* @__PURE__ */ R("div", {
707
+ children: [c.map((e, t) => /* @__PURE__ */ B("div", {
674
708
  className: "flex items-center gap-2",
675
- children: [/* @__PURE__ */ L(B, {
709
+ children: [/* @__PURE__ */ z(H, {
676
710
  value: e,
677
- onChange: (e) => c((n) => n.map((n, r) => r === t ? e.target.value : n)),
678
- placeholder: `Option ${t + 1}`
679
- }), s.length > 2 && /* @__PURE__ */ L(z, {
711
+ onChange: (e) => l((n) => n.map((n, r) => r === t ? e.target.value : n)),
712
+ placeholder: i("comradecircle.pages.circleDetail.pollOptionPlaceholder", "Option {{number}}", { number: t + 1 })
713
+ }), c.length > 2 && /* @__PURE__ */ z(V, {
680
714
  variant: "ghost",
681
715
  size: "icon",
682
- onClick: () => c((e) => e.filter((e, n) => n !== t)),
683
- "aria-label": `Remove option ${t + 1}`,
716
+ onClick: () => l((e) => e.filter((e, n) => n !== t)),
717
+ "aria-label": i("comradecircle.pages.circleDetail.removeOptionAriaLabel", "Remove option {{number}}", { number: t + 1 }),
684
718
  children: "✕"
685
719
  })]
686
- }, t)), s.length < 8 && /* @__PURE__ */ R(z, {
720
+ }, t)), c.length < 8 && /* @__PURE__ */ B(V, {
687
721
  variant: "outline",
688
722
  size: "sm",
689
- onClick: () => c((e) => [...e, ""]),
690
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " Add option"]
723
+ onClick: () => l((e) => [...e, ""]),
724
+ children: [
725
+ /* @__PURE__ */ z(I, { className: "mr-1.5 h-4 w-4" }),
726
+ " ",
727
+ i("comradecircle.pages.circleDetail.addOption", "Add option")
728
+ ]
691
729
  })]
692
730
  })]
693
731
  }),
694
- /* @__PURE__ */ R("div", {
732
+ /* @__PURE__ */ B("div", {
695
733
  className: "grid gap-1.5",
696
734
  children: [
697
- /* @__PURE__ */ L(V, {
735
+ /* @__PURE__ */ z(U, {
698
736
  htmlFor: "poll-closes",
699
- children: "Closes at"
737
+ children: i("comradecircle.pages.circleDetail.pollClosesLabel", "Closes at")
700
738
  }),
701
- /* @__PURE__ */ L(B, {
739
+ /* @__PURE__ */ z(H, {
702
740
  id: "poll-closes",
703
741
  type: "datetime-local",
704
- min: y,
705
- value: p,
706
- onChange: (e) => m(e.target.value)
742
+ min: x,
743
+ value: h,
744
+ onChange: (e) => g(e.target.value)
707
745
  }),
708
- /* @__PURE__ */ L("p", {
746
+ /* @__PURE__ */ z("p", {
709
747
  className: "text-xs text-text-tertiary",
710
- children: "Optional — leave empty to keep voting open indefinitely."
748
+ children: i("comradecircle.pages.circleDetail.pollClosesHint", "Optional — leave empty to keep voting open indefinitely.")
711
749
  })
712
750
  ]
713
751
  }),
714
- /* @__PURE__ */ R("div", {
752
+ /* @__PURE__ */ B("div", {
715
753
  className: "flex flex-col divide-y divide-border-seam rounded-xl border border-border-seam",
716
- children: [/* @__PURE__ */ R("div", {
754
+ children: [/* @__PURE__ */ B("div", {
717
755
  className: "flex items-center justify-between gap-4 px-3 py-3",
718
- children: [/* @__PURE__ */ R("div", {
756
+ children: [/* @__PURE__ */ B("div", {
719
757
  className: "min-w-0",
720
- children: [/* @__PURE__ */ L(V, {
758
+ children: [/* @__PURE__ */ z(U, {
721
759
  htmlFor: "poll-multi",
722
- children: "Allow multiple choices"
723
- }), /* @__PURE__ */ L("p", {
760
+ children: i("comradecircle.pages.circleDetail.pollMultiLabel", "Allow multiple choices")
761
+ }), /* @__PURE__ */ z("p", {
724
762
  className: "text-xs text-text-tertiary",
725
- children: "Let voters pick more than one option."
763
+ children: i("comradecircle.pages.circleDetail.pollMultiHint", "Let voters pick more than one option.")
726
764
  })]
727
- }), /* @__PURE__ */ L(he, {
765
+ }), /* @__PURE__ */ z(he, {
728
766
  id: "poll-multi",
729
- checked: l,
730
- onCheckedChange: u
767
+ checked: u,
768
+ onCheckedChange: d
731
769
  })]
732
- }), /* @__PURE__ */ R("div", {
770
+ }), /* @__PURE__ */ B("div", {
733
771
  className: "flex items-center justify-between gap-4 px-3 py-3",
734
- children: [/* @__PURE__ */ R("div", {
772
+ children: [/* @__PURE__ */ B("div", {
735
773
  className: "min-w-0",
736
- children: [/* @__PURE__ */ L(V, {
774
+ children: [/* @__PURE__ */ z(U, {
737
775
  htmlFor: "poll-anon",
738
- children: "Anonymous voting"
739
- }), /* @__PURE__ */ L("p", {
776
+ children: i("comradecircle.pages.circleDetail.pollAnonymousLabel", "Anonymous voting")
777
+ }), /* @__PURE__ */ z("p", {
740
778
  className: "text-xs text-text-tertiary",
741
- children: "Hide who voted for each option."
779
+ children: i("comradecircle.pages.circleDetail.pollAnonymousHint", "Hide who voted for each option.")
742
780
  })]
743
- }), /* @__PURE__ */ L(he, {
781
+ }), /* @__PURE__ */ z(he, {
744
782
  id: "poll-anon",
745
- checked: d,
746
- onCheckedChange: f
783
+ checked: p,
784
+ onCheckedChange: m
747
785
  })]
748
786
  })]
749
787
  }),
750
- h && /* @__PURE__ */ L("p", {
788
+ y && /* @__PURE__ */ z("p", {
751
789
  className: "text-sm text-status-error-text",
752
- children: h
790
+ children: y
753
791
  })
754
792
  ]
755
793
  }),
756
- /* @__PURE__ */ R(G, { children: [/* @__PURE__ */ L(z, {
794
+ /* @__PURE__ */ B(G, { children: [/* @__PURE__ */ z(V, {
757
795
  variant: "outline",
758
796
  onClick: () => n(!1),
759
- children: "Cancel"
760
- }), /* @__PURE__ */ L(z, {
797
+ children: i("common.cancel", "Cancel")
798
+ }), /* @__PURE__ */ z(V, {
761
799
  onClick: async () => {
762
- let t = s.map((e) => e.trim()).filter(Boolean);
763
- if (!i.trim()) {
764
- v("A question is required.");
800
+ let t = c.map((e) => e.trim()).filter(Boolean);
801
+ if (!o.trim()) {
802
+ b(i("comradecircle.pages.circleDetail.pollQuestionRequired", "A question is required."));
765
803
  return;
766
804
  }
767
805
  if (t.length < 2) {
768
- v("Add at least two options.");
806
+ b(i("comradecircle.pages.circleDetail.pollOptionsRequired", "Add at least two options."));
769
807
  return;
770
808
  }
771
809
  try {
772
- await r.mutateAsync({
810
+ await a.mutateAsync({
773
811
  circleId: e,
774
- question: i.trim(),
812
+ question: o.trim(),
775
813
  options: t,
776
- allowMultiple: l,
777
- isAnonymous: d,
778
- closesAt: p ? new Date(p).toISOString() : null
779
- }), _.success("Poll created"), n(!1), b();
814
+ allowMultiple: u,
815
+ isAnonymous: p,
816
+ closesAt: h ? new Date(h).toISOString() : null
817
+ }), v.success(i("comradecircle.pages.circleDetail.pollCreated", "Poll created")), n(!1), S();
780
818
  } catch (e) {
781
- v(g(e));
819
+ b(_(e));
782
820
  }
783
821
  },
784
- disabled: r.isPending,
785
- children: "Create poll"
822
+ disabled: a.isPending,
823
+ children: i("comradecircle.pages.circleDetail.createPollAction", "Create poll")
786
824
  })] })
787
825
  ]
788
826
  })