@kopexa/grc 0.0.4 → 0.0.6

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.
@@ -4,6 +4,10 @@ var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
7
11
  var __copyProps = (to, from, except, desc) => {
8
12
  if (from && typeof from === "object" || typeof from === "function") {
9
13
  for (let key of __getOwnPropNames(from))
@@ -16,4 +20,351 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
16
20
 
17
21
  // src/risk/index.ts
18
22
  var risk_exports = {};
23
+ __export(risk_exports, {
24
+ RiskTreatmentCard: () => RiskTreatmentCard,
25
+ riskTreatmentMessages: () => messages
26
+ });
19
27
  module.exports = __toCommonJS(risk_exports);
28
+
29
+ // src/risk/messages.ts
30
+ var import_i18n = require("@kopexa/i18n");
31
+ var messages = (0, import_i18n.defineMessages)({
32
+ // Card title
33
+ title: {
34
+ id: "grc.risk_treatment.title",
35
+ defaultMessage: "Risk Treatment"
36
+ },
37
+ // Strategy selection
38
+ strategy_label: {
39
+ id: "grc.risk_treatment.strategy_label",
40
+ defaultMessage: "Selected Strategy"
41
+ },
42
+ strategy_prompt: {
43
+ id: "grc.risk_treatment.strategy_prompt",
44
+ defaultMessage: "How do you want to handle this risk?"
45
+ },
46
+ // Treatment options - labels
47
+ accept_label: {
48
+ id: "grc.risk_treatment.accept.label",
49
+ defaultMessage: "Accept"
50
+ },
51
+ mitigate_label: {
52
+ id: "grc.risk_treatment.mitigate.label",
53
+ defaultMessage: "Mitigate"
54
+ },
55
+ transfer_label: {
56
+ id: "grc.risk_treatment.transfer.label",
57
+ defaultMessage: "Transfer"
58
+ },
59
+ avoid_label: {
60
+ id: "grc.risk_treatment.avoid.label",
61
+ defaultMessage: "Avoid"
62
+ },
63
+ not_defined_label: {
64
+ id: "grc.risk_treatment.not_defined.label",
65
+ defaultMessage: "No strategy defined"
66
+ },
67
+ // Treatment options - descriptions
68
+ accept_description: {
69
+ id: "grc.risk_treatment.accept.description",
70
+ defaultMessage: "Consciously accept the risk because treatment costs exceed potential damage or the risk is within acceptable limits."
71
+ },
72
+ mitigate_description: {
73
+ id: "grc.risk_treatment.mitigate.description",
74
+ defaultMessage: "Reduce the risk to an acceptable level through implementation of controls and measures."
75
+ },
76
+ transfer_description: {
77
+ id: "grc.risk_treatment.transfer.description",
78
+ defaultMessage: "Transfer the risk to third parties (e.g., insurance, outsourcing)."
79
+ },
80
+ avoid_description: {
81
+ id: "grc.risk_treatment.avoid.description",
82
+ defaultMessage: "Completely eliminate the risk by avoiding the risky activity or changing business processes."
83
+ },
84
+ // Treatment options - hints (requirements)
85
+ mitigate_hint: {
86
+ id: "grc.risk_treatment.mitigate.hint",
87
+ defaultMessage: "Requires: Action plan, Control mapping"
88
+ },
89
+ transfer_hint: {
90
+ id: "grc.risk_treatment.transfer.hint",
91
+ defaultMessage: "Requires: Contract documentation, Residual risk assessment"
92
+ },
93
+ avoid_hint: {
94
+ id: "grc.risk_treatment.avoid.hint",
95
+ defaultMessage: "Requires: Business Impact Analysis"
96
+ },
97
+ accept_hint: {
98
+ id: "grc.risk_treatment.accept.hint",
99
+ defaultMessage: "Requires: Documented approval"
100
+ },
101
+ // Rationale
102
+ rationale_label: {
103
+ id: "grc.risk_treatment.rationale_label",
104
+ defaultMessage: "Rationale"
105
+ },
106
+ rationale_placeholder: {
107
+ id: "grc.risk_treatment.rationale_placeholder",
108
+ defaultMessage: "Document why this strategy was chosen..."
109
+ },
110
+ no_rationale: {
111
+ id: "grc.risk_treatment.no_rationale",
112
+ defaultMessage: "No rationale defined"
113
+ },
114
+ // Actions
115
+ edit: {
116
+ id: "grc.risk_treatment.edit",
117
+ defaultMessage: "Edit"
118
+ },
119
+ cancel: {
120
+ id: "grc.risk_treatment.cancel",
121
+ defaultMessage: "Cancel"
122
+ },
123
+ save: {
124
+ id: "grc.risk_treatment.save",
125
+ defaultMessage: "Save"
126
+ },
127
+ // Recommendation badge
128
+ recommended: {
129
+ id: "grc.risk_treatment.recommended",
130
+ defaultMessage: "Recommended"
131
+ }
132
+ });
133
+
134
+ // src/risk/risk-treatment-card.tsx
135
+ var import_i18n2 = require("@kopexa/i18n");
136
+ var import_icons = require("@kopexa/icons");
137
+ var import_sight = require("@kopexa/sight");
138
+ var import_react = require("react");
139
+ var import_jsx_runtime = require("react/jsx-runtime");
140
+ function TreatmentOption({
141
+ id,
142
+ label,
143
+ description,
144
+ hint,
145
+ isSelected,
146
+ isRecommended,
147
+ recommendedLabel,
148
+ onSelect
149
+ }) {
150
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
151
+ "button",
152
+ {
153
+ type: "button",
154
+ onClick: () => onSelect(id),
155
+ className: `
156
+ w-full text-left p-4 rounded-lg border-2 transition-all
157
+ ${isSelected ? "border-primary bg-primary/5" : "border-border hover:border-primary/50 hover:bg-muted/50"}
158
+ `,
159
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start gap-3", children: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
+ "div",
162
+ {
163
+ className: `
164
+ mt-0.5 size-5 rounded-full border-2 flex items-center justify-center flex-shrink-0
165
+ ${isSelected ? "border-primary bg-primary" : "border-muted-foreground"}
166
+ `,
167
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "size-2 rounded-full bg-primary-foreground" })
168
+ }
169
+ ),
170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-medium", children: label }),
173
+ isRecommended && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Chip, { size: "sm", color: "success", variant: "flat", children: recommendedLabel })
174
+ ] }),
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground mt-1", children: description }),
176
+ hint && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground mt-2 flex items-center gap-1", children: [
177
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-primary", children: "\u2192" }),
178
+ hint
179
+ ] })
180
+ ] })
181
+ ] })
182
+ }
183
+ );
184
+ }
185
+ var defaultValue = {
186
+ treatment: "not_defined",
187
+ rationale: void 0
188
+ };
189
+ function RiskTreatmentCard({
190
+ value,
191
+ onChange,
192
+ readOnly = false,
193
+ title,
194
+ recommended
195
+ }) {
196
+ const intl = (0, import_i18n2.useSafeIntl)();
197
+ const [isEditing, setIsEditing] = (0, import_react.useState)(false);
198
+ const [editValues, setEditValues] = (0, import_react.useState)(
199
+ value || defaultValue
200
+ );
201
+ const t = {
202
+ title: intl.formatMessage(messages.title),
203
+ strategyLabel: intl.formatMessage(messages.strategy_label),
204
+ strategyPrompt: intl.formatMessage(messages.strategy_prompt),
205
+ rationaleLabel: intl.formatMessage(messages.rationale_label),
206
+ rationalePlaceholder: intl.formatMessage(messages.rationale_placeholder),
207
+ noRationale: intl.formatMessage(messages.no_rationale),
208
+ edit: intl.formatMessage(messages.edit),
209
+ cancel: intl.formatMessage(messages.cancel),
210
+ save: intl.formatMessage(messages.save),
211
+ recommended: intl.formatMessage(messages.recommended),
212
+ // Treatment labels
213
+ acceptLabel: intl.formatMessage(messages.accept_label),
214
+ mitigateLabel: intl.formatMessage(messages.mitigate_label),
215
+ transferLabel: intl.formatMessage(messages.transfer_label),
216
+ avoidLabel: intl.formatMessage(messages.avoid_label),
217
+ notDefinedLabel: intl.formatMessage(messages.not_defined_label),
218
+ // Treatment descriptions
219
+ acceptDescription: intl.formatMessage(messages.accept_description),
220
+ mitigateDescription: intl.formatMessage(messages.mitigate_description),
221
+ transferDescription: intl.formatMessage(messages.transfer_description),
222
+ avoidDescription: intl.formatMessage(messages.avoid_description),
223
+ // Treatment hints
224
+ acceptHint: intl.formatMessage(messages.accept_hint),
225
+ mitigateHint: intl.formatMessage(messages.mitigate_hint),
226
+ transferHint: intl.formatMessage(messages.transfer_hint),
227
+ avoidHint: intl.formatMessage(messages.avoid_hint)
228
+ };
229
+ const treatmentLabels = {
230
+ accept: t.acceptLabel,
231
+ mitigate: t.mitigateLabel,
232
+ transfer: t.transferLabel,
233
+ avoid: t.avoidLabel,
234
+ not_defined: t.notDefinedLabel
235
+ };
236
+ const treatmentOptions = [
237
+ {
238
+ id: "accept",
239
+ label: t.acceptLabel,
240
+ description: t.acceptDescription,
241
+ hint: t.acceptHint
242
+ },
243
+ {
244
+ id: "mitigate",
245
+ label: t.mitigateLabel,
246
+ description: t.mitigateDescription,
247
+ hint: t.mitigateHint
248
+ },
249
+ {
250
+ id: "transfer",
251
+ label: t.transferLabel,
252
+ description: t.transferDescription,
253
+ hint: t.transferHint
254
+ },
255
+ {
256
+ id: "avoid",
257
+ label: t.avoidLabel,
258
+ description: t.avoidDescription,
259
+ hint: t.avoidHint
260
+ }
261
+ ];
262
+ const cardTitle = title != null ? title : t.title;
263
+ const currentValue = isEditing ? editValues : value || defaultValue;
264
+ const isNotDefined = currentValue.treatment === "not_defined";
265
+ const handleSave = () => {
266
+ onChange == null ? void 0 : onChange(editValues);
267
+ setIsEditing(false);
268
+ };
269
+ const handleCancel = () => {
270
+ setEditValues(value || defaultValue);
271
+ setIsEditing(false);
272
+ };
273
+ const handleStartEdit = () => {
274
+ setEditValues(value || defaultValue);
275
+ setIsEditing(true);
276
+ };
277
+ const handleTreatmentSelect = (treatment) => {
278
+ setEditValues((prev) => ({ ...prev, treatment }));
279
+ };
280
+ const handleRationaleChange = (rationale) => {
281
+ setEditValues((prev) => ({ ...prev, rationale: rationale || void 0 }));
282
+ };
283
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_sight.Card.Root, { variant: "accent", children: [
284
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_sight.Card.Header, { className: "flex flex-row items-center justify-between", children: [
285
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Heading, { level: "h3", className: "text-base", children: cardTitle }),
287
+ isEditing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Chip, { size: "sm", color: "primary", children: t.edit })
288
+ ] }),
289
+ !readOnly && (!isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
290
+ import_sight.Button,
291
+ {
292
+ variant: "ghost",
293
+ size: "sm",
294
+ isIconOnly: true,
295
+ onClick: handleStartEdit,
296
+ "aria-label": t.edit,
297
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EditIcon, { className: "size-4" })
298
+ }
299
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Button, { variant: "ghost", size: "sm", onClick: handleCancel, children: t.cancel }),
301
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Button, { size: "sm", onClick: handleSave, children: t.save })
302
+ ] }))
303
+ ] }),
304
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Card.Body, { className: "space-y-4", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
305
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
306
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: t.strategyPrompt }),
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid gap-3", children: treatmentOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
308
+ TreatmentOption,
309
+ {
310
+ id: option.id,
311
+ label: option.label,
312
+ description: option.description,
313
+ hint: option.hint,
314
+ isSelected: editValues.treatment === option.id,
315
+ isRecommended: recommended === option.id,
316
+ recommendedLabel: t.recommended,
317
+ onSelect: handleTreatmentSelect
318
+ },
319
+ option.id
320
+ )) })
321
+ ] }),
322
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Separator, {}),
323
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
324
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
325
+ "label",
326
+ {
327
+ htmlFor: "treatment-rationale",
328
+ className: "text-sm font-medium",
329
+ children: t.rationaleLabel
330
+ }
331
+ ),
332
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
333
+ import_sight.Textarea,
334
+ {
335
+ id: "treatment-rationale",
336
+ value: editValues.rationale || "",
337
+ onChange: (e) => handleRationaleChange(e.target.value),
338
+ placeholder: t.rationalePlaceholder,
339
+ rows: 3,
340
+ className: "text-sm"
341
+ }
342
+ )
343
+ ] })
344
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
345
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
346
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium mb-1", children: t.strategyLabel }),
347
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
348
+ !isNotDefined && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCirleIcon, { className: "size-4 text-success" }),
349
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
350
+ "p",
351
+ {
352
+ className: `text-sm ${isNotDefined ? "text-muted-foreground" : ""}`,
353
+ children: treatmentLabels[currentValue.treatment]
354
+ }
355
+ )
356
+ ] })
357
+ ] }),
358
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Separator, {}),
359
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
360
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium mb-1", children: t.rationaleLabel }),
361
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: currentValue.rationale || t.noRationale })
362
+ ] })
363
+ ] }) })
364
+ ] });
365
+ }
366
+ // Annotate the CommonJS export names for ESM import in node:
367
+ 0 && (module.exports = {
368
+ RiskTreatmentCard,
369
+ riskTreatmentMessages
370
+ });
@@ -1 +1,12 @@
1
1
  "use client";
2
+ import "../chunk-BAC3SZJH.mjs";
3
+ import {
4
+ RiskTreatmentCard
5
+ } from "../chunk-GC6CS627.mjs";
6
+ import {
7
+ messages
8
+ } from "../chunk-AHKTFAZC.mjs";
9
+ export {
10
+ RiskTreatmentCard,
11
+ messages as riskTreatmentMessages
12
+ };
@@ -0,0 +1,96 @@
1
+ declare const messages: {
2
+ title: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ strategy_label: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ strategy_prompt: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ accept_label: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ mitigate_label: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
22
+ transfer_label: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ avoid_label: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ not_defined_label: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ accept_description: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ mitigate_description: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ transfer_description: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ avoid_description: {
47
+ id: string;
48
+ defaultMessage: string;
49
+ };
50
+ mitigate_hint: {
51
+ id: string;
52
+ defaultMessage: string;
53
+ };
54
+ transfer_hint: {
55
+ id: string;
56
+ defaultMessage: string;
57
+ };
58
+ avoid_hint: {
59
+ id: string;
60
+ defaultMessage: string;
61
+ };
62
+ accept_hint: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ };
66
+ rationale_label: {
67
+ id: string;
68
+ defaultMessage: string;
69
+ };
70
+ rationale_placeholder: {
71
+ id: string;
72
+ defaultMessage: string;
73
+ };
74
+ no_rationale: {
75
+ id: string;
76
+ defaultMessage: string;
77
+ };
78
+ edit: {
79
+ id: string;
80
+ defaultMessage: string;
81
+ };
82
+ cancel: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ };
86
+ save: {
87
+ id: string;
88
+ defaultMessage: string;
89
+ };
90
+ recommended: {
91
+ id: string;
92
+ defaultMessage: string;
93
+ };
94
+ };
95
+
96
+ export { messages };
@@ -0,0 +1,96 @@
1
+ declare const messages: {
2
+ title: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ strategy_label: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ strategy_prompt: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ accept_label: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ mitigate_label: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
22
+ transfer_label: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ avoid_label: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ not_defined_label: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ accept_description: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ mitigate_description: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ transfer_description: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ avoid_description: {
47
+ id: string;
48
+ defaultMessage: string;
49
+ };
50
+ mitigate_hint: {
51
+ id: string;
52
+ defaultMessage: string;
53
+ };
54
+ transfer_hint: {
55
+ id: string;
56
+ defaultMessage: string;
57
+ };
58
+ avoid_hint: {
59
+ id: string;
60
+ defaultMessage: string;
61
+ };
62
+ accept_hint: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ };
66
+ rationale_label: {
67
+ id: string;
68
+ defaultMessage: string;
69
+ };
70
+ rationale_placeholder: {
71
+ id: string;
72
+ defaultMessage: string;
73
+ };
74
+ no_rationale: {
75
+ id: string;
76
+ defaultMessage: string;
77
+ };
78
+ edit: {
79
+ id: string;
80
+ defaultMessage: string;
81
+ };
82
+ cancel: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ };
86
+ save: {
87
+ id: string;
88
+ defaultMessage: string;
89
+ };
90
+ recommended: {
91
+ id: string;
92
+ defaultMessage: string;
93
+ };
94
+ };
95
+
96
+ export { messages };
@@ -0,0 +1,133 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/risk/messages.ts
22
+ var messages_exports = {};
23
+ __export(messages_exports, {
24
+ messages: () => messages
25
+ });
26
+ module.exports = __toCommonJS(messages_exports);
27
+ var import_i18n = require("@kopexa/i18n");
28
+ var messages = (0, import_i18n.defineMessages)({
29
+ // Card title
30
+ title: {
31
+ id: "grc.risk_treatment.title",
32
+ defaultMessage: "Risk Treatment"
33
+ },
34
+ // Strategy selection
35
+ strategy_label: {
36
+ id: "grc.risk_treatment.strategy_label",
37
+ defaultMessage: "Selected Strategy"
38
+ },
39
+ strategy_prompt: {
40
+ id: "grc.risk_treatment.strategy_prompt",
41
+ defaultMessage: "How do you want to handle this risk?"
42
+ },
43
+ // Treatment options - labels
44
+ accept_label: {
45
+ id: "grc.risk_treatment.accept.label",
46
+ defaultMessage: "Accept"
47
+ },
48
+ mitigate_label: {
49
+ id: "grc.risk_treatment.mitigate.label",
50
+ defaultMessage: "Mitigate"
51
+ },
52
+ transfer_label: {
53
+ id: "grc.risk_treatment.transfer.label",
54
+ defaultMessage: "Transfer"
55
+ },
56
+ avoid_label: {
57
+ id: "grc.risk_treatment.avoid.label",
58
+ defaultMessage: "Avoid"
59
+ },
60
+ not_defined_label: {
61
+ id: "grc.risk_treatment.not_defined.label",
62
+ defaultMessage: "No strategy defined"
63
+ },
64
+ // Treatment options - descriptions
65
+ accept_description: {
66
+ id: "grc.risk_treatment.accept.description",
67
+ defaultMessage: "Consciously accept the risk because treatment costs exceed potential damage or the risk is within acceptable limits."
68
+ },
69
+ mitigate_description: {
70
+ id: "grc.risk_treatment.mitigate.description",
71
+ defaultMessage: "Reduce the risk to an acceptable level through implementation of controls and measures."
72
+ },
73
+ transfer_description: {
74
+ id: "grc.risk_treatment.transfer.description",
75
+ defaultMessage: "Transfer the risk to third parties (e.g., insurance, outsourcing)."
76
+ },
77
+ avoid_description: {
78
+ id: "grc.risk_treatment.avoid.description",
79
+ defaultMessage: "Completely eliminate the risk by avoiding the risky activity or changing business processes."
80
+ },
81
+ // Treatment options - hints (requirements)
82
+ mitigate_hint: {
83
+ id: "grc.risk_treatment.mitigate.hint",
84
+ defaultMessage: "Requires: Action plan, Control mapping"
85
+ },
86
+ transfer_hint: {
87
+ id: "grc.risk_treatment.transfer.hint",
88
+ defaultMessage: "Requires: Contract documentation, Residual risk assessment"
89
+ },
90
+ avoid_hint: {
91
+ id: "grc.risk_treatment.avoid.hint",
92
+ defaultMessage: "Requires: Business Impact Analysis"
93
+ },
94
+ accept_hint: {
95
+ id: "grc.risk_treatment.accept.hint",
96
+ defaultMessage: "Requires: Documented approval"
97
+ },
98
+ // Rationale
99
+ rationale_label: {
100
+ id: "grc.risk_treatment.rationale_label",
101
+ defaultMessage: "Rationale"
102
+ },
103
+ rationale_placeholder: {
104
+ id: "grc.risk_treatment.rationale_placeholder",
105
+ defaultMessage: "Document why this strategy was chosen..."
106
+ },
107
+ no_rationale: {
108
+ id: "grc.risk_treatment.no_rationale",
109
+ defaultMessage: "No rationale defined"
110
+ },
111
+ // Actions
112
+ edit: {
113
+ id: "grc.risk_treatment.edit",
114
+ defaultMessage: "Edit"
115
+ },
116
+ cancel: {
117
+ id: "grc.risk_treatment.cancel",
118
+ defaultMessage: "Cancel"
119
+ },
120
+ save: {
121
+ id: "grc.risk_treatment.save",
122
+ defaultMessage: "Save"
123
+ },
124
+ // Recommendation badge
125
+ recommended: {
126
+ id: "grc.risk_treatment.recommended",
127
+ defaultMessage: "Recommended"
128
+ }
129
+ });
130
+ // Annotate the CommonJS export names for ESM import in node:
131
+ 0 && (module.exports = {
132
+ messages
133
+ });