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