@notificationapi/react 1.6.2 → 1.8.0

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 (57) hide show
  1. package/dist/assets/Badge.js +4 -3
  2. package/dist/assets/Box.js +26 -24
  3. package/dist/assets/Button.js +20 -18
  4. package/dist/assets/ButtonBase.js +193 -185
  5. package/dist/assets/DefaultPropsProvider.js +416 -4199
  6. package/dist/assets/DefaultPropsProvider2.js +992 -0
  7. package/dist/assets/Divider.js +2 -1
  8. package/dist/assets/GlobalStyles.js +23 -0
  9. package/dist/assets/Grow.js +87 -92
  10. package/dist/assets/IconButton.js +8 -7
  11. package/dist/assets/List.js +12 -11
  12. package/dist/assets/Modal.js +18 -17
  13. package/dist/assets/Notification.js +787 -770
  14. package/dist/assets/Paper.js +6 -6
  15. package/dist/assets/Popover.js +38 -37
  16. package/dist/assets/Portal.js +38 -48
  17. package/dist/assets/Stack.js +32 -30
  18. package/dist/assets/Typography.js +84 -97
  19. package/dist/assets/createSvgIcon.js +25 -24
  20. package/dist/assets/createTheme.js +2828 -0
  21. package/dist/assets/dividerClasses.js +16 -15
  22. package/dist/assets/exactProp.js +13 -0
  23. package/dist/assets/index.js +19 -148
  24. package/dist/assets/index2.js +151 -0
  25. package/dist/assets/useTheme.js +6 -7
  26. package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
  27. package/dist/assets/utils.js +2 -2
  28. package/dist/components/Notifications/DefaultEmpty.d.ts +0 -1
  29. package/dist/components/Notifications/Inbox.d.ts +0 -1
  30. package/dist/components/Notifications/Inbox.js +592 -582
  31. package/dist/components/Notifications/InboxHeader.js +31 -30
  32. package/dist/components/Notifications/Notification.d.ts +0 -1
  33. package/dist/components/Notifications/Notification.js +4 -2
  34. package/dist/components/Notifications/NotificationCounter.d.ts +0 -1
  35. package/dist/components/Notifications/NotificationFeed.d.ts +0 -1
  36. package/dist/components/Notifications/NotificationFeed.js +40 -32
  37. package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
  38. package/dist/components/Notifications/NotificationLauncher.js +90 -64
  39. package/dist/components/Notifications/NotificationPopup.d.ts +0 -1
  40. package/dist/components/Notifications/NotificationPopup.js +76 -65
  41. package/dist/components/Notifications/UnreadBadge.d.ts +0 -1
  42. package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
  43. package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
  44. package/dist/components/Preferences/PreferenceInput.d.ts +0 -1
  45. package/dist/components/Preferences/PreferenceInput.js +427 -414
  46. package/dist/components/Preferences/Preferences.js +329 -278
  47. package/dist/components/Preferences/channelUtils.d.ts +0 -1
  48. package/dist/components/Provider/context.d.ts +0 -1
  49. package/dist/components/Provider/index.d.ts +4 -2
  50. package/dist/components/Provider/index.js +986 -375
  51. package/dist/components/Slack/SlackConnect.js +8 -7
  52. package/dist/components/WebPush/WebPushOptInMessage.d.ts +0 -1
  53. package/dist/main.d.ts +2 -1
  54. package/dist/main.js +6 -3
  55. package/dist/utils/theme.d.ts +17 -0
  56. package/dist/utils/theme.js +104 -0
  57. package/package.json +7 -3
@@ -1,31 +1,33 @@
1
- import { jsxs as R, jsx as i, Fragment as ne } from "react/jsx-runtime";
1
+ import { jsxs as x, jsx as n, Fragment as ne } from "react/jsx-runtime";
2
2
  import { g as we, a as Ce } from "../../assets/channelUtils.js";
3
+ import { getThemeColors as ke } from "../../utils/theme.js";
4
+ import { B as Se, r as W, b as Re, u as xe } from "../../assets/ButtonBase.js";
3
5
  import { T as _ } from "../../assets/Typography.js";
4
- import * as g from "react";
5
- import { e as L, g as q, s as w, K as ee, c as j, P as o, h as v, b as D, m as I, u as W, a as A, J as ke, I as Se } from "../../assets/DefaultPropsProvider.js";
6
+ import * as v from "react";
7
+ import { g as L, P as o, e as w, a as A, o as Oe, n as $e } from "../../assets/createTheme.js";
8
+ import { g as q, s as C, r as ee, c as j, a as D, m as I, u as H } from "../../assets/DefaultPropsProvider.js";
6
9
  import { c as Q } from "../../assets/createSimplePaletteValueFilter.js";
7
- import { u as H, f as ue, c as Re, S as Oe } from "../../assets/Stack.js";
8
- import { B as xe, r as K, a as $e } from "../../assets/ButtonBase.js";
9
- import { a as fe, u as Pe } from "../../assets/dividerClasses.js";
10
- import { u as Te } from "../../assets/resolveComponentProps.js";
11
- import { c as be } from "../../assets/createSvgIcon.js";
12
- import { D as Fe } from "../../assets/Divider.js";
13
- function Ne(e) {
10
+ import { u as X, f as ue, c as Pe, S as Te } from "../../assets/Stack.js";
11
+ import { a as fe, u as Fe } from "../../assets/dividerClasses.js";
12
+ import { u as Ne } from "../../assets/resolveComponentProps.js";
13
+ import { c as he } from "../../assets/createSvgIcon.js";
14
+ import { D as Be } from "../../assets/Divider.js";
15
+ function Ie(e) {
14
16
  return L("PrivateSwitchBase", e);
15
17
  }
16
18
  q("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
17
- const Be = (e) => {
19
+ const ze = (e) => {
18
20
  const {
19
21
  classes: t,
20
22
  checked: r,
21
- disabled: a,
22
- edge: s
23
+ disabled: s,
24
+ edge: a
23
25
  } = e, c = {
24
- root: ["root", r && "checked", a && "disabled", s && `edge${v(s)}`],
26
+ root: ["root", r && "checked", s && "disabled", a && `edge${w(a)}`],
25
27
  input: ["input"]
26
28
  };
27
- return D(c, Ne, t);
28
- }, Ie = w(xe)({
29
+ return D(c, Ie, t);
30
+ }, je = C(Se)({
29
31
  padding: 9,
30
32
  borderRadius: "50%",
31
33
  variants: [{
@@ -61,7 +63,7 @@ const Be = (e) => {
61
63
  marginRight: -12
62
64
  }
63
65
  }]
64
- }), ze = w("input", {
66
+ }), Me = C("input", {
65
67
  shouldForwardProp: ee
66
68
  })({
67
69
  cursor: "inherit",
@@ -74,87 +76,87 @@ const Be = (e) => {
74
76
  margin: 0,
75
77
  padding: 0,
76
78
  zIndex: 1
77
- }), oe = /* @__PURE__ */ g.forwardRef(function(t, r) {
79
+ }), oe = /* @__PURE__ */ v.forwardRef(function(t, r) {
78
80
  const {
79
- autoFocus: a,
80
- checked: s,
81
+ autoFocus: s,
82
+ checked: a,
81
83
  checkedIcon: c,
82
- className: l,
84
+ className: i,
83
85
  defaultChecked: u,
84
- disabled: f,
85
- disableFocusRipple: p = !1,
86
- edge: d = !1,
87
- icon: n,
88
- id: m,
89
- inputProps: k,
90
- inputRef: S,
91
- name: N,
92
- onBlur: y,
93
- onChange: P,
94
- onFocus: b,
95
- readOnly: T,
86
+ disabled: d,
87
+ disableFocusRipple: m = !1,
88
+ edge: f = !1,
89
+ icon: p,
90
+ id: b,
91
+ inputProps: l,
92
+ inputRef: R,
93
+ name: k,
94
+ onBlur: h,
95
+ onChange: T,
96
+ onFocus: g,
97
+ readOnly: F,
96
98
  required: O = !1,
97
99
  tabIndex: M,
98
- type: C,
100
+ type: S,
99
101
  value: G,
100
- ...X
102
+ ...K
101
103
  } = t, [z, U] = fe({
102
- controlled: s,
104
+ controlled: a,
103
105
  default: !!u,
104
106
  name: "SwitchBase",
105
107
  state: "checked"
106
- }), x = H(), J = (F) => {
107
- b && b(F), x && x.onFocus && x.onFocus(F);
108
- }, E = (F) => {
109
- y && y(F), x && x.onBlur && x.onBlur(F);
110
- }, B = (F) => {
111
- if (F.nativeEvent.defaultPrevented)
108
+ }), $ = X(), Z = (N) => {
109
+ g && g(N), $ && $.onFocus && $.onFocus(N);
110
+ }, E = (N) => {
111
+ h && h(N), $ && $.onBlur && $.onBlur(N);
112
+ }, B = (N) => {
113
+ if (N.nativeEvent.defaultPrevented)
112
114
  return;
113
- const se = F.target.checked;
114
- U(se), P && P(F, se);
115
+ const ae = N.target.checked;
116
+ U(ae), T && T(N, ae);
115
117
  };
116
- let $ = f;
117
- x && typeof $ > "u" && ($ = x.disabled);
118
- const ve = C === "checkbox" || C === "radio", Z = {
118
+ let P = d;
119
+ $ && typeof P > "u" && (P = $.disabled);
120
+ const ve = S === "checkbox" || S === "radio", J = {
119
121
  ...t,
120
122
  checked: z,
121
- disabled: $,
122
- disableFocusRipple: p,
123
- edge: d
124
- }, ae = Be(Z);
125
- return /* @__PURE__ */ R(Ie, {
123
+ disabled: P,
124
+ disableFocusRipple: m,
125
+ edge: f
126
+ }, se = ze(J);
127
+ return /* @__PURE__ */ x(je, {
126
128
  component: "span",
127
- className: j(ae.root, l),
129
+ className: j(se.root, i),
128
130
  centerRipple: !0,
129
- focusRipple: !p,
130
- disabled: $,
131
+ focusRipple: !m,
132
+ disabled: P,
131
133
  tabIndex: null,
132
134
  role: void 0,
133
- onFocus: J,
135
+ onFocus: Z,
134
136
  onBlur: E,
135
- ownerState: Z,
137
+ ownerState: J,
136
138
  ref: r,
137
- ...X,
138
- children: [/* @__PURE__ */ i(ze, {
139
- autoFocus: a,
140
- checked: s,
139
+ ...K,
140
+ children: [/* @__PURE__ */ n(Me, {
141
+ autoFocus: s,
142
+ checked: a,
141
143
  defaultChecked: u,
142
- className: ae.input,
143
- disabled: $,
144
- id: ve ? m : void 0,
145
- name: N,
144
+ className: se.input,
145
+ disabled: P,
146
+ id: ve ? b : void 0,
147
+ name: k,
146
148
  onChange: B,
147
- readOnly: T,
148
- ref: S,
149
+ readOnly: F,
150
+ ref: R,
149
151
  required: O,
150
- ownerState: Z,
152
+ ownerState: J,
151
153
  tabIndex: M,
152
- type: C,
153
- ...C === "checkbox" && G === void 0 ? {} : {
154
+ type: S,
155
+ ...S === "checkbox" && G === void 0 ? {} : {
154
156
  value: G
155
157
  },
156
- ...k
157
- }), z ? c : n]
158
+ ...l
159
+ }), z ? c : p]
158
160
  });
159
161
  });
160
162
  process.env.NODE_ENV !== "production" && (oe.propTypes = {
@@ -214,7 +216,7 @@ process.env.NODE_ENV !== "production" && (oe.propTypes = {
214
216
  /**
215
217
  * Pass a ref to the `input` element.
216
218
  */
217
- inputRef: K,
219
+ inputRef: W,
218
220
  /*
219
221
  * @ignore
220
222
  */
@@ -260,23 +262,23 @@ process.env.NODE_ENV !== "production" && (oe.propTypes = {
260
262
  */
261
263
  value: o.any
262
264
  });
263
- function je(e) {
265
+ function Ee(e) {
264
266
  return L("MuiFormControlLabel", e);
265
267
  }
266
- const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), Me = (e) => {
268
+ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), Le = (e) => {
267
269
  const {
268
270
  classes: t,
269
271
  disabled: r,
270
- labelPlacement: a,
271
- error: s,
272
+ labelPlacement: s,
273
+ error: a,
272
274
  required: c
273
- } = e, l = {
274
- root: ["root", r && "disabled", `labelPlacement${v(a)}`, s && "error", c && "required"],
275
+ } = e, i = {
276
+ root: ["root", r && "disabled", `labelPlacement${w(s)}`, a && "error", c && "required"],
275
277
  label: ["label", r && "disabled"],
276
- asterisk: ["asterisk", s && "error"]
278
+ asterisk: ["asterisk", a && "error"]
277
279
  };
278
- return D(l, je, t);
279
- }, Ee = w("label", {
280
+ return D(i, Ee, t);
281
+ }, qe = C("label", {
280
282
  name: "MuiFormControlLabel",
281
283
  slot: "Root",
282
284
  overridesResolver: (e, t) => {
@@ -285,7 +287,7 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
285
287
  } = e;
286
288
  return [{
287
289
  [`& .${V.label}`]: t.label
288
- }, t.root, t[`labelPlacement${v(r.labelPlacement)}`]];
290
+ }, t.root, t[`labelPlacement${w(r.labelPlacement)}`]];
289
291
  }
290
292
  })(I(({
291
293
  theme: e
@@ -338,7 +340,7 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
338
340
  // used for row presentation of radio/checkbox
339
341
  }
340
342
  }]
341
- }))), Le = w("span", {
343
+ }))), De = C("span", {
342
344
  name: "MuiFormControlLabel",
343
345
  slot: "Asterisk",
344
346
  overridesResolver: (e, t) => t.asterisk
@@ -348,68 +350,68 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
348
350
  [`&.${V.error}`]: {
349
351
  color: (e.vars || e).palette.error.main
350
352
  }
351
- }))), he = /* @__PURE__ */ g.forwardRef(function(t, r) {
352
- const a = W({
353
+ }))), me = /* @__PURE__ */ v.forwardRef(function(t, r) {
354
+ const s = H({
353
355
  props: t,
354
356
  name: "MuiFormControlLabel"
355
357
  }), {
356
- checked: s,
358
+ checked: a,
357
359
  className: c,
358
- componentsProps: l = {},
360
+ componentsProps: i = {},
359
361
  control: u,
360
- disabled: f,
361
- disableTypography: p,
362
- inputRef: d,
363
- label: n,
364
- labelPlacement: m = "end",
365
- name: k,
366
- onChange: S,
367
- required: N,
368
- slots: y = {},
369
- slotProps: P = {},
370
- value: b,
371
- ...T
372
- } = a, O = H(), M = f ?? u.props.disabled ?? (O == null ? void 0 : O.disabled), C = N ?? u.props.required, G = {
362
+ disabled: d,
363
+ disableTypography: m,
364
+ inputRef: f,
365
+ label: p,
366
+ labelPlacement: b = "end",
367
+ name: l,
368
+ onChange: R,
369
+ required: k,
370
+ slots: h = {},
371
+ slotProps: T = {},
372
+ value: g,
373
+ ...F
374
+ } = s, O = X(), M = d ?? u.props.disabled ?? (O == null ? void 0 : O.disabled), S = k ?? u.props.required, G = {
373
375
  disabled: M,
374
- required: C
376
+ required: S
375
377
  };
376
- ["checked", "name", "onChange", "value", "inputRef"].forEach(($) => {
377
- typeof u.props[$] > "u" && typeof a[$] < "u" && (G[$] = a[$]);
378
+ ["checked", "name", "onChange", "value", "inputRef"].forEach((P) => {
379
+ typeof u.props[P] > "u" && typeof s[P] < "u" && (G[P] = s[P]);
378
380
  });
379
- const X = ue({
380
- props: a,
381
+ const K = ue({
382
+ props: s,
381
383
  muiFormControl: O,
382
384
  states: ["error"]
383
385
  }), z = {
384
- ...a,
386
+ ...s,
385
387
  disabled: M,
386
- labelPlacement: m,
387
- required: C,
388
- error: X.error
389
- }, U = Me(z), x = {
390
- slots: y,
388
+ labelPlacement: b,
389
+ required: S,
390
+ error: K.error
391
+ }, U = Le(z), $ = {
392
+ slots: h,
391
393
  slotProps: {
392
- ...l,
393
- ...P
394
+ ...i,
395
+ ...T
394
396
  }
395
- }, [J, E] = $e("typography", {
397
+ }, [Z, E] = Re("typography", {
396
398
  elementType: _,
397
- externalForwardedProps: x,
399
+ externalForwardedProps: $,
398
400
  ownerState: z
399
401
  });
400
- let B = n;
401
- return B != null && B.type !== _ && !p && (B = /* @__PURE__ */ i(J, {
402
+ let B = p;
403
+ return B != null && B.type !== _ && !m && (B = /* @__PURE__ */ n(Z, {
402
404
  component: "span",
403
405
  ...E,
404
406
  className: j(U.label, E == null ? void 0 : E.className),
405
407
  children: B
406
- })), /* @__PURE__ */ R(Ee, {
408
+ })), /* @__PURE__ */ x(qe, {
407
409
  className: j(U.root, c),
408
410
  ownerState: z,
409
411
  ref: r,
410
- ...T,
411
- children: [/* @__PURE__ */ g.cloneElement(u, G), C ? /* @__PURE__ */ R("div", {
412
- children: [B, /* @__PURE__ */ R(Le, {
412
+ ...F,
413
+ children: [/* @__PURE__ */ v.cloneElement(u, G), S ? /* @__PURE__ */ x("div", {
414
+ children: [B, /* @__PURE__ */ x(De, {
413
415
  ownerState: z,
414
416
  "aria-hidden": !0,
415
417
  className: U.asterisk,
@@ -418,7 +420,7 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
418
420
  }) : B]
419
421
  });
420
422
  });
421
- process.env.NODE_ENV !== "production" && (he.propTypes = {
423
+ process.env.NODE_ENV !== "production" && (me.propTypes = {
422
424
  // ┌────────────────────────────── Warning ──────────────────────────────┐
423
425
  // │ These PropTypes are generated from the TypeScript type definitions. │
424
426
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -458,7 +460,7 @@ process.env.NODE_ENV !== "production" && (he.propTypes = {
458
460
  /**
459
461
  * Pass a ref to the `input` element.
460
462
  */
461
- inputRef: K,
463
+ inputRef: W,
462
464
  /**
463
465
  * A text or an element to be used in an enclosing label element.
464
466
  */
@@ -506,20 +508,20 @@ process.env.NODE_ENV !== "production" && (he.propTypes = {
506
508
  */
507
509
  value: o.any
508
510
  });
509
- function qe(e) {
511
+ function Ge(e) {
510
512
  return L("MuiFormGroup", e);
511
513
  }
512
514
  q("MuiFormGroup", ["root", "row", "error"]);
513
- const De = (e) => {
515
+ const Ue = (e) => {
514
516
  const {
515
517
  classes: t,
516
518
  row: r,
517
- error: a
519
+ error: s
518
520
  } = e;
519
521
  return D({
520
- root: ["root", r && "row", a && "error"]
521
- }, qe, t);
522
- }, Ge = w("div", {
522
+ root: ["root", r && "row", s && "error"]
523
+ }, Ge, t);
524
+ }, Ve = C("div", {
523
525
  name: "MuiFormGroup",
524
526
  slot: "Root",
525
527
  overridesResolver: (e, t) => {
@@ -540,31 +542,31 @@ const De = (e) => {
540
542
  flexDirection: "row"
541
543
  }
542
544
  }]
543
- }), me = /* @__PURE__ */ g.forwardRef(function(t, r) {
544
- const a = W({
545
+ }), be = /* @__PURE__ */ v.forwardRef(function(t, r) {
546
+ const s = H({
545
547
  props: t,
546
548
  name: "MuiFormGroup"
547
549
  }), {
548
- className: s,
550
+ className: a,
549
551
  row: c = !1,
550
- ...l
551
- } = a, u = H(), f = ue({
552
- props: a,
552
+ ...i
553
+ } = s, u = X(), d = ue({
554
+ props: s,
553
555
  muiFormControl: u,
554
556
  states: ["error"]
555
- }), p = {
556
- ...a,
557
+ }), m = {
558
+ ...s,
557
559
  row: c,
558
- error: f.error
559
- }, d = De(p);
560
- return /* @__PURE__ */ i(Ge, {
561
- className: j(d.root, s),
562
- ownerState: p,
560
+ error: d.error
561
+ }, f = Ue(m);
562
+ return /* @__PURE__ */ n(Ve, {
563
+ className: j(f.root, a),
564
+ ownerState: m,
563
565
  ref: r,
564
- ...l
566
+ ...i
565
567
  });
566
568
  });
567
- process.env.NODE_ENV !== "production" && (me.propTypes = {
569
+ process.env.NODE_ENV !== "production" && (be.propTypes = {
568
570
  // ┌────────────────────────────── Warning ──────────────────────────────┐
569
571
  // │ These PropTypes are generated from the TypeScript type definitions. │
570
572
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -591,19 +593,19 @@ process.env.NODE_ENV !== "production" && (me.propTypes = {
591
593
  */
592
594
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
593
595
  });
594
- const Ue = be(/* @__PURE__ */ i("path", {
596
+ const _e = he(/* @__PURE__ */ n("path", {
595
597
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
596
- }), "RadioButtonUnchecked"), Ve = be(/* @__PURE__ */ i("path", {
598
+ }), "RadioButtonUnchecked"), Ae = he(/* @__PURE__ */ n("path", {
597
599
  d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
598
- }), "RadioButtonChecked"), _e = w("span", {
600
+ }), "RadioButtonChecked"), We = C("span", {
599
601
  shouldForwardProp: ee
600
602
  })({
601
603
  position: "relative",
602
604
  display: "flex"
603
- }), Ae = w(Ue)({
605
+ }), He = C(_e)({
604
606
  // Scale applied to prevent dot misalignment in Safari
605
607
  transform: "scale(1)"
606
- }), We = w(Ve)(I(({
608
+ }), Xe = C(Ae)(I(({
607
609
  theme: e
608
610
  }) => ({
609
611
  left: 0,
@@ -630,22 +632,22 @@ function te(e) {
630
632
  const {
631
633
  checked: t = !1,
632
634
  classes: r = {},
633
- fontSize: a
634
- } = e, s = {
635
+ fontSize: s
636
+ } = e, a = {
635
637
  ...e,
636
638
  checked: t
637
639
  };
638
- return /* @__PURE__ */ R(_e, {
640
+ return /* @__PURE__ */ x(We, {
639
641
  className: r.root,
640
- ownerState: s,
641
- children: [/* @__PURE__ */ i(Ae, {
642
- fontSize: a,
642
+ ownerState: a,
643
+ children: [/* @__PURE__ */ n(He, {
644
+ fontSize: s,
643
645
  className: r.background,
644
- ownerState: s
645
- }), /* @__PURE__ */ i(We, {
646
- fontSize: a,
646
+ ownerState: a
647
+ }), /* @__PURE__ */ n(Xe, {
648
+ fontSize: s,
647
649
  className: r.dot,
648
- ownerState: s
650
+ ownerState: a
649
651
  })]
650
652
  });
651
653
  }
@@ -664,27 +666,27 @@ process.env.NODE_ENV !== "production" && (te.propTypes = {
664
666
  */
665
667
  fontSize: o.oneOf(["small", "medium"])
666
668
  });
667
- const re = /* @__PURE__ */ g.createContext(void 0);
669
+ const re = /* @__PURE__ */ v.createContext(void 0);
668
670
  process.env.NODE_ENV !== "production" && (re.displayName = "RadioGroupContext");
669
- function He() {
670
- return g.useContext(re);
671
+ function Ke() {
672
+ return v.useContext(re);
671
673
  }
672
- function Ke(e) {
674
+ function Ze(e) {
673
675
  return L("MuiRadio", e);
674
676
  }
675
- const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), Xe = (e) => {
677
+ const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), Je = (e) => {
676
678
  const {
677
679
  classes: t,
678
680
  color: r,
679
- size: a
680
- } = e, s = {
681
- root: ["root", `color${v(r)}`, a !== "medium" && `size${v(a)}`]
681
+ size: s
682
+ } = e, a = {
683
+ root: ["root", `color${w(r)}`, s !== "medium" && `size${w(s)}`]
682
684
  };
683
685
  return {
684
686
  ...t,
685
- ...D(s, Ke, t)
687
+ ...D(a, Ze, t)
686
688
  };
687
- }, Je = w(oe, {
689
+ }, Qe = C(oe, {
688
690
  shouldForwardProp: (e) => ee(e) || e === "classes",
689
691
  name: "MuiRadio",
690
692
  slot: "Root",
@@ -692,7 +694,7 @@ const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorS
692
694
  const {
693
695
  ownerState: r
694
696
  } = e;
695
- return [t.root, r.size !== "medium" && t[`size${v(r.size)}`], t[`color${v(r.color)}`]];
697
+ return [t.root, r.size !== "medium" && t[`size${w(r.size)}`], t[`color${w(r.color)}`]];
696
698
  }
697
699
  })(I(({
698
700
  theme: e
@@ -748,57 +750,57 @@ const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorS
748
750
  }
749
751
  }]
750
752
  })));
751
- function Ze(e, t) {
753
+ function Ye(e, t) {
752
754
  return typeof t == "object" && t !== null ? e === t : String(e) === String(t);
753
755
  }
754
- const le = /* @__PURE__ */ i(te, {
756
+ const le = /* @__PURE__ */ n(te, {
755
757
  checked: !0
756
- }), ce = /* @__PURE__ */ i(te, {}), ge = /* @__PURE__ */ g.forwardRef(function(t, r) {
757
- const a = W({
758
+ }), ce = /* @__PURE__ */ n(te, {}), ge = /* @__PURE__ */ v.forwardRef(function(t, r) {
759
+ const s = H({
758
760
  props: t,
759
761
  name: "MuiRadio"
760
762
  }), {
761
- checked: s,
763
+ checked: a,
762
764
  checkedIcon: c = le,
763
- color: l = "primary",
765
+ color: i = "primary",
764
766
  icon: u = ce,
765
- name: f,
766
- onChange: p,
767
- size: d = "medium",
768
- className: n,
769
- disabled: m,
770
- disableRipple: k = !1,
771
- ...S
772
- } = a, N = H();
773
- let y = m;
774
- N && typeof y > "u" && (y = N.disabled), y ?? (y = !1);
775
- const P = {
776
- ...a,
777
- disabled: y,
778
- disableRipple: k,
779
- color: l,
780
- size: d
781
- }, b = Xe(P), T = He();
782
- let O = s;
783
- const M = Re(p, T && T.onChange);
784
- let C = f;
785
- return T && (typeof O > "u" && (O = Ze(T.value, a.value)), typeof C > "u" && (C = T.name)), /* @__PURE__ */ i(Je, {
767
+ name: d,
768
+ onChange: m,
769
+ size: f = "medium",
770
+ className: p,
771
+ disabled: b,
772
+ disableRipple: l = !1,
773
+ ...R
774
+ } = s, k = X();
775
+ let h = b;
776
+ k && typeof h > "u" && (h = k.disabled), h ?? (h = !1);
777
+ const T = {
778
+ ...s,
779
+ disabled: h,
780
+ disableRipple: l,
781
+ color: i,
782
+ size: f
783
+ }, g = Je(T), F = Ke();
784
+ let O = a;
785
+ const M = Pe(m, F && F.onChange);
786
+ let S = d;
787
+ return F && (typeof O > "u" && (O = Ye(F.value, s.value)), typeof S > "u" && (S = F.name)), /* @__PURE__ */ n(Qe, {
786
788
  type: "radio",
787
- icon: /* @__PURE__ */ g.cloneElement(u, {
788
- fontSize: ce.props.fontSize ?? d
789
+ icon: /* @__PURE__ */ v.cloneElement(u, {
790
+ fontSize: ce.props.fontSize ?? f
789
791
  }),
790
- checkedIcon: /* @__PURE__ */ g.cloneElement(c, {
791
- fontSize: le.props.fontSize ?? d
792
+ checkedIcon: /* @__PURE__ */ v.cloneElement(c, {
793
+ fontSize: le.props.fontSize ?? f
792
794
  }),
793
- disabled: y,
794
- ownerState: P,
795
- classes: b,
796
- name: C,
795
+ disabled: h,
796
+ ownerState: T,
797
+ classes: g,
798
+ name: S,
797
799
  checked: O,
798
800
  onChange: M,
799
801
  ref: r,
800
- className: j(b.root, n),
801
- ...S
802
+ className: j(g.root, p),
803
+ ...R
802
804
  });
803
805
  });
804
806
  process.env.NODE_ENV !== "production" && (ge.propTypes = {
@@ -855,7 +857,7 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
855
857
  /**
856
858
  * Pass a ref to the `input` element.
857
859
  */
858
- inputRef: K,
860
+ inputRef: W,
859
861
  /**
860
862
  * Name attribute of the `input` element.
861
863
  */
@@ -888,57 +890,57 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
888
890
  */
889
891
  value: o.any
890
892
  });
891
- function Qe(e) {
893
+ function eo(e) {
892
894
  return L("MuiRadioGroup", e);
893
895
  }
894
896
  q("MuiRadioGroup", ["root", "row", "error"]);
895
- const Ye = (e) => {
897
+ const oo = (e) => {
896
898
  const {
897
899
  classes: t,
898
900
  row: r,
899
- error: a
901
+ error: s
900
902
  } = e;
901
903
  return D({
902
- root: ["root", r && "row", a && "error"]
903
- }, Qe, t);
904
- }, ye = /* @__PURE__ */ g.forwardRef(function(t, r) {
904
+ root: ["root", r && "row", s && "error"]
905
+ }, eo, t);
906
+ }, ye = /* @__PURE__ */ v.forwardRef(function(t, r) {
905
907
  const {
906
908
  // private
907
909
  // eslint-disable-next-line react/prop-types
908
- actions: a,
909
- children: s,
910
+ actions: s,
911
+ children: a,
910
912
  className: c,
911
- defaultValue: l,
913
+ defaultValue: i,
912
914
  name: u,
913
- onChange: f,
914
- value: p,
915
- ...d
916
- } = t, n = g.useRef(null), m = Ye(t), [k, S] = fe({
917
- controlled: p,
918
- default: l,
915
+ onChange: d,
916
+ value: m,
917
+ ...f
918
+ } = t, p = v.useRef(null), b = oo(t), [l, R] = fe({
919
+ controlled: m,
920
+ default: i,
919
921
  name: "RadioGroup"
920
922
  });
921
- g.useImperativeHandle(a, () => ({
923
+ v.useImperativeHandle(s, () => ({
922
924
  focus: () => {
923
- let b = n.current.querySelector("input:not(:disabled):checked");
924
- b || (b = n.current.querySelector("input:not(:disabled)")), b && b.focus();
925
+ let g = p.current.querySelector("input:not(:disabled):checked");
926
+ g || (g = p.current.querySelector("input:not(:disabled)")), g && g.focus();
925
927
  }
926
928
  }), []);
927
- const N = Te(r, n), y = Pe(u), P = g.useMemo(() => ({
928
- name: y,
929
- onChange(b) {
930
- S(b.target.value), f && f(b, b.target.value);
929
+ const k = Ne(r, p), h = Fe(u), T = v.useMemo(() => ({
930
+ name: h,
931
+ onChange(g) {
932
+ R(g.target.value), d && d(g, g.target.value);
931
933
  },
932
- value: k
933
- }), [y, f, S, k]);
934
- return /* @__PURE__ */ i(re.Provider, {
935
- value: P,
936
- children: /* @__PURE__ */ i(me, {
934
+ value: l
935
+ }), [h, d, R, l]);
936
+ return /* @__PURE__ */ n(re.Provider, {
937
+ value: T,
938
+ children: /* @__PURE__ */ n(be, {
937
939
  role: "radiogroup",
938
- ref: N,
939
- className: j(m.root, c),
940
- ...d,
941
- children: s
940
+ ref: k,
941
+ className: j(b.root, c),
942
+ ...f,
943
+ children: a
942
944
  })
943
945
  });
944
946
  });
@@ -977,37 +979,37 @@ process.env.NODE_ENV !== "production" && (ye.propTypes = {
977
979
  */
978
980
  value: o.any
979
981
  });
980
- function eo(e) {
982
+ function to(e) {
981
983
  return L("MuiSwitch", e);
982
984
  }
983
- const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), oo = (e) => {
985
+ const y = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), ro = (e) => {
984
986
  const {
985
987
  classes: t,
986
988
  edge: r,
987
- size: a,
988
- color: s,
989
+ size: s,
990
+ color: a,
989
991
  checked: c,
990
- disabled: l
992
+ disabled: i
991
993
  } = e, u = {
992
- root: ["root", r && `edge${v(r)}`, `size${v(a)}`],
993
- switchBase: ["switchBase", `color${v(s)}`, c && "checked", l && "disabled"],
994
+ root: ["root", r && `edge${w(r)}`, `size${w(s)}`],
995
+ switchBase: ["switchBase", `color${w(a)}`, c && "checked", i && "disabled"],
994
996
  thumb: ["thumb"],
995
997
  track: ["track"],
996
998
  input: ["input"]
997
- }, f = D(u, eo, t);
999
+ }, d = D(u, to, t);
998
1000
  return {
999
1001
  ...t,
1000
1002
  // forward the disabled and checked classes to the SwitchBase
1001
- ...f
1003
+ ...d
1002
1004
  };
1003
- }, to = w("span", {
1005
+ }, so = C("span", {
1004
1006
  name: "MuiSwitch",
1005
1007
  slot: "Root",
1006
1008
  overridesResolver: (e, t) => {
1007
1009
  const {
1008
1010
  ownerState: r
1009
1011
  } = e;
1010
- return [t.root, r.edge && t[`edge${v(r.edge)}`], t[`size${v(r.size)}`]];
1012
+ return [t.root, r.edge && t[`edge${w(r.edge)}`], t[`size${w(r.size)}`]];
1011
1013
  }
1012
1014
  })({
1013
1015
  display: "inline-flex",
@@ -1047,19 +1049,19 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1047
1049
  width: 40,
1048
1050
  height: 24,
1049
1051
  padding: 7,
1050
- [`& .${h.thumb}`]: {
1052
+ [`& .${y.thumb}`]: {
1051
1053
  width: 16,
1052
1054
  height: 16
1053
1055
  },
1054
- [`& .${h.switchBase}`]: {
1056
+ [`& .${y.switchBase}`]: {
1055
1057
  padding: 4,
1056
- [`&.${h.checked}`]: {
1058
+ [`&.${y.checked}`]: {
1057
1059
  transform: "translateX(16px)"
1058
1060
  }
1059
1061
  }
1060
1062
  }
1061
1063
  }]
1062
- }), ro = w(oe, {
1064
+ }), ao = C(oe, {
1063
1065
  name: "MuiSwitch",
1064
1066
  slot: "SwitchBase",
1065
1067
  overridesResolver: (e, t) => {
@@ -1067,8 +1069,8 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1067
1069
  ownerState: r
1068
1070
  } = e;
1069
1071
  return [t.switchBase, {
1070
- [`& .${h.input}`]: t.input
1071
- }, r.color !== "default" && t[`color${v(r.color)}`]];
1072
+ [`& .${y.input}`]: t.input
1073
+ }, r.color !== "default" && t[`color${w(r.color)}`]];
1072
1074
  }
1073
1075
  })(I(({
1074
1076
  theme: e
@@ -1082,19 +1084,19 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1082
1084
  transition: e.transitions.create(["left", "transform"], {
1083
1085
  duration: e.transitions.duration.shortest
1084
1086
  }),
1085
- [`&.${h.checked}`]: {
1087
+ [`&.${y.checked}`]: {
1086
1088
  transform: "translateX(20px)"
1087
1089
  },
1088
- [`&.${h.disabled}`]: {
1090
+ [`&.${y.disabled}`]: {
1089
1091
  color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}`
1090
1092
  },
1091
- [`&.${h.checked} + .${h.track}`]: {
1093
+ [`&.${y.checked} + .${y.track}`]: {
1092
1094
  opacity: 0.5
1093
1095
  },
1094
- [`&.${h.disabled} + .${h.track}`]: {
1096
+ [`&.${y.disabled} + .${y.track}`]: {
1095
1097
  opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? 0.12 : 0.2}`
1096
1098
  },
1097
- [`& .${h.input}`]: {
1099
+ [`& .${y.input}`]: {
1098
1100
  left: "-100%",
1099
1101
  width: "300%"
1100
1102
  }
@@ -1113,7 +1115,7 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1113
1115
  color: t
1114
1116
  },
1115
1117
  style: {
1116
- [`&.${h.checked}`]: {
1118
+ [`&.${y.checked}`]: {
1117
1119
  color: (e.vars || e).palette[t].main,
1118
1120
  "&:hover": {
1119
1121
  backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : A(e.palette[t].main, e.palette.action.hoverOpacity),
@@ -1121,16 +1123,16 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1121
1123
  backgroundColor: "transparent"
1122
1124
  }
1123
1125
  },
1124
- [`&.${h.disabled}`]: {
1125
- color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? ke(e.palette[t].main, 0.62) : Se(e.palette[t].main, 0.55)}`
1126
+ [`&.${y.disabled}`]: {
1127
+ color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? Oe(e.palette[t].main, 0.62) : $e(e.palette[t].main, 0.55)}`
1126
1128
  }
1127
1129
  },
1128
- [`&.${h.checked} + .${h.track}`]: {
1130
+ [`&.${y.checked} + .${y.track}`]: {
1129
1131
  backgroundColor: (e.vars || e).palette[t].main
1130
1132
  }
1131
1133
  }
1132
1134
  }))]
1133
- }))), ao = w("span", {
1135
+ }))), no = C("span", {
1134
1136
  name: "MuiSwitch",
1135
1137
  slot: "Track",
1136
1138
  overridesResolver: (e, t) => t.track
@@ -1146,7 +1148,7 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1146
1148
  }),
1147
1149
  backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
1148
1150
  opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? 0.38 : 0.3}`
1149
- }))), so = w("span", {
1151
+ }))), io = C("span", {
1150
1152
  name: "MuiSwitch",
1151
1153
  slot: "Thumb",
1152
1154
  overridesResolver: (e, t) => t.thumb
@@ -1158,44 +1160,44 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
1158
1160
  width: 20,
1159
1161
  height: 20,
1160
1162
  borderRadius: "50%"
1161
- }))), Y = /* @__PURE__ */ g.forwardRef(function(t, r) {
1162
- const a = W({
1163
+ }))), Y = /* @__PURE__ */ v.forwardRef(function(t, r) {
1164
+ const s = H({
1163
1165
  props: t,
1164
1166
  name: "MuiSwitch"
1165
1167
  }), {
1166
- className: s,
1168
+ className: a,
1167
1169
  color: c = "primary",
1168
- edge: l = !1,
1170
+ edge: i = !1,
1169
1171
  size: u = "medium",
1170
- sx: f,
1171
- ...p
1172
- } = a, d = {
1173
- ...a,
1172
+ sx: d,
1173
+ ...m
1174
+ } = s, f = {
1175
+ ...s,
1174
1176
  color: c,
1175
- edge: l,
1177
+ edge: i,
1176
1178
  size: u
1177
- }, n = oo(d), m = /* @__PURE__ */ i(so, {
1178
- className: n.thumb,
1179
- ownerState: d
1179
+ }, p = ro(f), b = /* @__PURE__ */ n(io, {
1180
+ className: p.thumb,
1181
+ ownerState: f
1180
1182
  });
1181
- return /* @__PURE__ */ R(to, {
1182
- className: j(n.root, s),
1183
- sx: f,
1184
- ownerState: d,
1185
- children: [/* @__PURE__ */ i(ro, {
1183
+ return /* @__PURE__ */ x(so, {
1184
+ className: j(p.root, a),
1185
+ sx: d,
1186
+ ownerState: f,
1187
+ children: [/* @__PURE__ */ n(ao, {
1186
1188
  type: "checkbox",
1187
- icon: m,
1188
- checkedIcon: m,
1189
+ icon: b,
1190
+ checkedIcon: b,
1189
1191
  ref: r,
1190
- ownerState: d,
1191
- ...p,
1192
+ ownerState: f,
1193
+ ...m,
1192
1194
  classes: {
1193
- ...n,
1194
- root: n.switchBase
1195
+ ...p,
1196
+ root: p.switchBase
1195
1197
  }
1196
- }), /* @__PURE__ */ i(ao, {
1197
- className: n.track,
1198
- ownerState: d
1198
+ }), /* @__PURE__ */ n(no, {
1199
+ className: p.track,
1200
+ ownerState: f
1199
1201
  })]
1200
1202
  });
1201
1203
  });
@@ -1263,7 +1265,7 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
1263
1265
  /**
1264
1266
  * Pass a ref to the `input` element.
1265
1267
  */
1266
- inputRef: K,
1268
+ inputRef: W,
1267
1269
  /**
1268
1270
  * Callback fired when the state is changed.
1269
1271
  *
@@ -1293,7 +1295,7 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
1293
1295
  */
1294
1296
  value: o.any
1295
1297
  });
1296
- const no = (e, t) => {
1298
+ const lo = (e, t) => {
1297
1299
  const r = [
1298
1300
  "EMAIL",
1299
1301
  "INAPP_WEB",
@@ -1314,140 +1316,151 @@ const no = (e, t) => {
1314
1316
  daily: "Daily",
1315
1317
  weekly: "Weekly",
1316
1318
  monthly: "Monthly"
1317
- })[e], vo = ({
1319
+ })[e], So = ({
1318
1320
  notification: e,
1319
1321
  preferences: t,
1320
1322
  updateDelivery: r,
1321
- subNotificationId: a
1322
- }) => /* @__PURE__ */ i(ne, { children: e.channels.sort(no).map((s, c) => {
1323
- const l = t.find(
1324
- (n) => n.notificationId === e.notificationId && n.channel === s
1325
- );
1326
- if (!l)
1327
- return null;
1328
- const u = we(s), f = Ce(s), p = Object.keys(
1329
- e.options[s]
1330
- ).filter(
1331
- (n) => n !== "defaultDeliveryOption" && n !== "defaultDeliverOption"
1332
- );
1333
- let d;
1334
- return p.length === 1 ? d = /* @__PURE__ */ i(_, { variant: "body1", children: pe(l.delivery) }) : p.length === 2 && p.includes("off") ? d = /* @__PURE__ */ i(
1335
- Y,
1336
- {
1337
- checked: l.delivery !== "off",
1338
- onChange: (n, m) => {
1339
- if (m) {
1340
- const k = p.find((S) => S !== "off");
1341
- r(
1342
- e.notificationId,
1343
- s,
1344
- k,
1345
- a
1346
- );
1347
- } else
1348
- r(
1349
- e.notificationId,
1350
- s,
1351
- "off",
1352
- a
1353
- );
1354
- }
1355
- }
1356
- ) : d = /* @__PURE__ */ R(ne, { children: [
1357
- /* @__PURE__ */ i(
1323
+ subNotificationId: s
1324
+ }) => {
1325
+ const a = xe(), c = ke(a);
1326
+ return /* @__PURE__ */ n(ne, { children: e.channels.sort(lo).map((i, u) => {
1327
+ const d = t.find(
1328
+ (l) => l.notificationId === e.notificationId && l.channel === i
1329
+ );
1330
+ if (!d)
1331
+ return null;
1332
+ const m = we(i), f = Ce(i), p = Object.keys(
1333
+ e.options[i]
1334
+ ).filter(
1335
+ (l) => l !== "defaultDeliveryOption" && l !== "defaultDeliverOption"
1336
+ );
1337
+ let b;
1338
+ return p.length === 1 ? b = /* @__PURE__ */ n(_, { variant: "body1", sx: { color: c.text }, children: pe(d.delivery) }) : p.length === 2 && p.includes("off") ? b = /* @__PURE__ */ n(
1358
1339
  Y,
1359
1340
  {
1360
- checked: l.delivery !== "off",
1361
- onChange: (n, m) => {
1362
- if (m) {
1363
- const k = p.sort(de).find((S) => S !== "off");
1341
+ checked: d.delivery !== "off",
1342
+ onChange: (l, R) => {
1343
+ if (R) {
1344
+ const k = p.find((h) => h !== "off");
1364
1345
  r(
1365
1346
  e.notificationId,
1366
- s,
1347
+ i,
1367
1348
  k,
1368
- a
1349
+ s
1369
1350
  );
1370
1351
  } else
1371
1352
  r(
1372
1353
  e.notificationId,
1373
- s,
1354
+ i,
1374
1355
  "off",
1375
- a
1356
+ s
1376
1357
  );
1377
1358
  }
1378
1359
  }
1379
- ),
1380
- /* @__PURE__ */ i(
1381
- "div",
1382
- {
1383
- style: {
1384
- width: "100%",
1385
- marginTop: 8,
1386
- maxHeight: l.delivery !== "off" ? 1e3 : 0,
1387
- overflow: "hidden",
1388
- transition: "max-height 0.3s ease"
1389
- },
1390
- children: /* @__PURE__ */ R("div", { children: [
1391
- /* @__PURE__ */ i("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ i(_, { variant: "body1", fontWeight: 600, children: "Choose frequency:" }) }),
1392
- /* @__PURE__ */ i(
1393
- ye,
1394
- {
1395
- value: l.delivery,
1396
- onChange: (n) => {
1397
- r(
1398
- e.notificationId,
1399
- s,
1400
- n.target.value,
1401
- a
1402
- );
1403
- },
1404
- children: /* @__PURE__ */ i(Oe, { direction: "column", style: { paddingTop: 10 }, children: p.filter((n) => n !== "off").sort(de).map((n) => /* @__PURE__ */ i(
1405
- he,
1406
- {
1407
- control: /* @__PURE__ */ i(ge, {}),
1408
- value: n,
1409
- label: pe(n)
1360
+ ) : b = /* @__PURE__ */ x(ne, { children: [
1361
+ /* @__PURE__ */ n(
1362
+ Y,
1363
+ {
1364
+ checked: d.delivery !== "off",
1365
+ onChange: (l, R) => {
1366
+ if (R) {
1367
+ const k = p.sort(de).find((h) => h !== "off");
1368
+ r(
1369
+ e.notificationId,
1370
+ i,
1371
+ k,
1372
+ s
1373
+ );
1374
+ } else
1375
+ r(
1376
+ e.notificationId,
1377
+ i,
1378
+ "off",
1379
+ s
1380
+ );
1381
+ }
1382
+ }
1383
+ ),
1384
+ /* @__PURE__ */ n(
1385
+ "div",
1386
+ {
1387
+ style: {
1388
+ width: "100%",
1389
+ marginTop: 8,
1390
+ maxHeight: d.delivery !== "off" ? 1e3 : 0,
1391
+ overflow: "hidden",
1392
+ transition: "max-height 0.3s ease"
1393
+ },
1394
+ children: /* @__PURE__ */ x("div", { children: [
1395
+ /* @__PURE__ */ n("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ n(
1396
+ _,
1397
+ {
1398
+ variant: "body1",
1399
+ fontWeight: 600,
1400
+ sx: { color: c.text },
1401
+ children: "Choose frequency:"
1402
+ }
1403
+ ) }),
1404
+ /* @__PURE__ */ n(
1405
+ ye,
1406
+ {
1407
+ value: d.delivery,
1408
+ onChange: (l) => {
1409
+ r(
1410
+ e.notificationId,
1411
+ i,
1412
+ l.target.value,
1413
+ s
1414
+ );
1410
1415
  },
1411
- n
1412
- )) })
1413
- }
1414
- )
1415
- ] })
1416
- }
1417
- )
1418
- ] }), /* @__PURE__ */ R("div", { children: [
1419
- /* @__PURE__ */ R(
1420
- "div",
1421
- {
1422
- style: {
1423
- display: "flex",
1424
- justifyContent: "space-between",
1425
- flexWrap: "wrap",
1426
- marginTop: c === 0 ? 0 : 12,
1427
- marginBottom: c === e.channels.length - 1 ? 0 : 12
1428
- },
1429
- children: [
1430
- /* @__PURE__ */ R(
1431
- "div",
1432
- {
1433
- style: {
1434
- display: "flex",
1435
- alignItems: "center",
1436
- gap: 8
1437
- },
1438
- children: [
1439
- f,
1440
- /* @__PURE__ */ i(_, { variant: "body1", children: u })
1441
- ]
1442
- }
1443
- ),
1444
- d
1445
- ]
1446
- }
1447
- ),
1448
- c !== e.channels.length - 1 && /* @__PURE__ */ i(Fe, {})
1449
- ] }, s);
1450
- }) });
1416
+ children: /* @__PURE__ */ n(Te, { direction: "column", style: { paddingTop: 10 }, children: p.filter((l) => l !== "off").sort(de).map((l) => /* @__PURE__ */ n(
1417
+ me,
1418
+ {
1419
+ control: /* @__PURE__ */ n(ge, {}),
1420
+ value: l,
1421
+ label: pe(l)
1422
+ },
1423
+ l
1424
+ )) })
1425
+ }
1426
+ )
1427
+ ] })
1428
+ }
1429
+ )
1430
+ ] }), /* @__PURE__ */ x("div", { children: [
1431
+ /* @__PURE__ */ x(
1432
+ "div",
1433
+ {
1434
+ style: {
1435
+ display: "flex",
1436
+ justifyContent: "space-between",
1437
+ flexWrap: "wrap",
1438
+ marginTop: u === 0 ? 0 : 12,
1439
+ marginBottom: u === e.channels.length - 1 ? 0 : 12
1440
+ },
1441
+ children: [
1442
+ /* @__PURE__ */ x(
1443
+ "div",
1444
+ {
1445
+ style: {
1446
+ display: "flex",
1447
+ alignItems: "center",
1448
+ gap: 8
1449
+ },
1450
+ children: [
1451
+ f,
1452
+ /* @__PURE__ */ n(_, { variant: "body1", sx: { color: c.text }, children: m })
1453
+ ]
1454
+ }
1455
+ ),
1456
+ b
1457
+ ]
1458
+ }
1459
+ ),
1460
+ u !== e.channels.length - 1 && /* @__PURE__ */ n(Be, { sx: { borderColor: c.divider } })
1461
+ ] }, i);
1462
+ }) });
1463
+ };
1451
1464
  export {
1452
- vo as PreferenceInput
1465
+ So as PreferenceInput
1453
1466
  };