@redacto.io/consent-sdk-react-native 5.0.0 → 5.0.1-beta.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.
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports);
37
37
 
38
38
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
39
39
  var import_react2 = require("react");
40
- var import_react_native5 = require("react-native");
40
+ var import_react_native6 = require("react-native");
41
41
  var import_react_native_svg3 = __toESM(require("react-native-svg"));
42
42
 
43
43
  // src/RedactoNoticeConsent/api/index.ts
@@ -106,6 +106,8 @@ var sandboxQueryIdentity = (sandbox) => sandboxBodyIdentity(sandbox);
106
106
 
107
107
  // src/constants.ts
108
108
  var DEFAULT_CONSENT_API_BASE_URL = "https://api.redacto.io/consent";
109
+ var REQUIRED_MARKER_GLYPH = " *";
110
+ var REQUIRED_MARKER_COLOR = "red";
109
111
 
110
112
  // src/shared/languages.ts
111
113
  var languageOptions = [
@@ -599,11 +601,21 @@ var styles = import_react_native.StyleSheet.create({
599
601
  }
600
602
  });
601
603
 
604
+ // src/RedactoNoticeConsent/components/RequiredMarker.tsx
605
+ var import_react_native2 = require("react-native");
606
+ var import_jsx_runtime2 = require("react/jsx-runtime");
607
+ var RequiredMarker = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles2.marker, children: REQUIRED_MARKER_GLYPH });
608
+ var styles2 = import_react_native2.StyleSheet.create({
609
+ marker: {
610
+ color: REQUIRED_MARKER_COLOR
611
+ }
612
+ });
613
+
602
614
  // src/RedactoNoticeConsent/components/VerificationScreen.tsx
603
615
  var import_react = require("react");
604
- var import_react_native2 = require("react-native");
616
+ var import_react_native3 = require("react-native");
605
617
  var import_react_native_svg2 = __toESM(require("react-native-svg"));
606
- var import_jsx_runtime2 = require("react/jsx-runtime");
618
+ var import_jsx_runtime3 = require("react/jsx-runtime");
607
619
  var VerificationScreen = ({
608
620
  status,
609
621
  errorMessage,
@@ -623,32 +635,32 @@ var VerificationScreen = ({
623
635
  const declineBg = ((_f = (_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) == null ? void 0 : _f.backgroundColor) || "#ffffff";
624
636
  const declineText = ((_h = (_g = settings == null ? void 0 : settings.button) == null ? void 0 : _g.decline) == null ? void 0 : _h.textColor) || "#000000";
625
637
  const borderColor = (settings == null ? void 0 : settings.borderColor) || "#d0d5dd";
626
- const scaleAnim = (0, import_react.useRef)(new import_react_native2.Animated.Value(0.3)).current;
627
- const contentAnim = (0, import_react.useRef)(new import_react_native2.Animated.Value(0)).current;
628
- const pulseAnim = (0, import_react.useRef)(new import_react_native2.Animated.Value(0.6)).current;
638
+ const scaleAnim = (0, import_react.useRef)(new import_react_native3.Animated.Value(0.3)).current;
639
+ const contentAnim = (0, import_react.useRef)(new import_react_native3.Animated.Value(0)).current;
640
+ const pulseAnim = (0, import_react.useRef)(new import_react_native3.Animated.Value(0.6)).current;
629
641
  (0, import_react.useEffect)(() => {
630
- import_react_native2.Animated.spring(scaleAnim, {
642
+ import_react_native3.Animated.spring(scaleAnim, {
631
643
  toValue: 1,
632
644
  friction: 5,
633
645
  tension: 40,
634
646
  delay: 100,
635
647
  useNativeDriver: true
636
648
  }).start();
637
- import_react_native2.Animated.timing(contentAnim, {
649
+ import_react_native3.Animated.timing(contentAnim, {
638
650
  toValue: 1,
639
651
  duration: 400,
640
652
  delay: 250,
641
653
  useNativeDriver: true
642
654
  }).start();
643
655
  if (status === "verified") {
644
- import_react_native2.Animated.loop(
645
- import_react_native2.Animated.sequence([
646
- import_react_native2.Animated.timing(pulseAnim, {
656
+ import_react_native3.Animated.loop(
657
+ import_react_native3.Animated.sequence([
658
+ import_react_native3.Animated.timing(pulseAnim, {
647
659
  toValue: 0,
648
660
  duration: 1200,
649
661
  useNativeDriver: true
650
662
  }),
651
- import_react_native2.Animated.timing(pulseAnim, {
663
+ import_react_native3.Animated.timing(pulseAnim, {
652
664
  toValue: 0.6,
653
665
  duration: 0,
654
666
  useNativeDriver: true
@@ -671,20 +683,20 @@ var VerificationScreen = ({
671
683
  return errorMessage || "An error occurred during verification. Please try again.";
672
684
  }
673
685
  };
674
- const renderPendingContent = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.centerContent, children: [
675
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.ActivityIndicator, { size: "large", color: acceptBg, style: s.pendingSpinner }),
676
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.infoBanner, children: [
677
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native_svg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: [
678
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_svg2.Circle, { cx: "12", cy: "12", r: "10", stroke: "#059669", strokeWidth: 2 }),
679
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_svg2.Path, { d: "M12 16v-4M12 8h.01", stroke: "#059669", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
686
+ const renderPendingContent = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.centerContent, children: [
687
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.ActivityIndicator, { size: "large", color: acceptBg, style: s.pendingSpinner }),
688
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.infoBanner, children: [
689
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native_svg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: [
690
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.Circle, { cx: "12", cy: "12", r: "10", stroke: "#059669", strokeWidth: 2 }),
691
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.Path, { d: "M12 16v-4M12 8h.01", stroke: "#059669", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
680
692
  ] }),
681
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: s.infoBannerText, children: "Please complete the verification in Safari. This screen will update automatically when verification is complete." })
693
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: s.infoBannerText, children: "Please complete the verification in Safari. This screen will update automatically when verification is complete." })
682
694
  ] })
683
695
  ] });
684
- const renderSuccessContent = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.centerContent, children: [
685
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.iconWrapper, children: [
686
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
687
- import_react_native2.Animated.View,
696
+ const renderSuccessContent = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.centerContent, children: [
697
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.iconWrapper, children: [
698
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
699
+ import_react_native3.Animated.View,
688
700
  {
689
701
  style: [
690
702
  s.pulseRing,
@@ -700,7 +712,7 @@ var VerificationScreen = ({
700
712
  ]
701
713
  }
702
714
  ),
703
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Animated.View, { style: [s.successCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_svg2.default, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
715
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Animated.View, { style: [s.successCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.default, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
704
716
  import_react_native_svg2.Path,
705
717
  {
706
718
  d: "M5 13L9 17L19 7",
@@ -711,8 +723,8 @@ var VerificationScreen = ({
711
723
  }
712
724
  ) }) })
713
725
  ] }),
714
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
715
- import_react_native2.Animated.Text,
726
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
727
+ import_react_native3.Animated.Text,
716
728
  {
717
729
  style: [
718
730
  s.statusTitle,
@@ -721,8 +733,8 @@ var VerificationScreen = ({
721
733
  children: "Verification Completed"
722
734
  }
723
735
  ),
724
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
725
- import_react_native2.Animated.Text,
736
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
737
+ import_react_native3.Animated.Text,
726
738
  {
727
739
  style: [
728
740
  s.statusSubtext,
@@ -732,8 +744,8 @@ var VerificationScreen = ({
732
744
  }
733
745
  )
734
746
  ] });
735
- const renderErrorContent = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.centerContent, children: [
736
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: s.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Animated.View, { style: [s.errorCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_svg2.default, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
747
+ const renderErrorContent = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.centerContent, children: [
748
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: s.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Animated.View, { style: [s.errorCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.default, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
737
749
  import_react_native_svg2.Path,
738
750
  {
739
751
  d: "M18 6L6 18M6 6L18 18",
@@ -743,8 +755,8 @@ var VerificationScreen = ({
743
755
  strokeLinejoin: "round"
744
756
  }
745
757
  ) }) }) }),
746
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
747
- import_react_native2.Animated.Text,
758
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
759
+ import_react_native3.Animated.Text,
748
760
  {
749
761
  style: [
750
762
  s.statusTitle,
@@ -756,8 +768,8 @@ var VerificationScreen = ({
756
768
  ]
757
769
  }
758
770
  ),
759
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.Animated.View, { style: [s.errorBanner, { opacity: contentAnim }], children: [
760
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_svg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
771
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.Animated.View, { style: [s.errorBanner, { opacity: contentAnim }], children: [
772
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
761
773
  import_react_native_svg2.Path,
762
774
  {
763
775
  d: "M12 9v4M12 17h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
@@ -767,69 +779,69 @@ var VerificationScreen = ({
767
779
  strokeLinejoin: "round"
768
780
  }
769
781
  ) }),
770
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: s.errorBannerText, children: getErrorGuidance() })
782
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: s.errorBannerText, children: getErrorGuidance() })
771
783
  ] })
772
784
  ] });
773
785
  const renderBottomButtons = () => {
774
786
  if (status === "verified") {
775
787
  if (!onContinue) return null;
776
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
777
- import_react_native2.TouchableOpacity,
788
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
789
+ import_react_native3.TouchableOpacity,
778
790
  {
779
791
  style: [s.primaryButton, { backgroundColor: acceptBg }],
780
792
  onPress: onContinue,
781
793
  activeOpacity: 0.8,
782
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Continue" })
794
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Continue" })
783
795
  }
784
796
  ) });
785
797
  }
786
798
  if (status === "failed" || status === "expired") {
787
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: [
788
- errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
789
- import_react_native2.TouchableOpacity,
799
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: [
800
+ errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
801
+ import_react_native3.TouchableOpacity,
790
802
  {
791
803
  style: [s.primaryButton, { backgroundColor: acceptBg }],
792
804
  onPress: onChangeGuardian,
793
805
  activeOpacity: 0.8,
794
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Change Guardian" })
806
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Change Guardian" })
795
807
  }
796
- ) : canRetry !== false ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
797
- import_react_native2.TouchableOpacity,
808
+ ) : canRetry !== false ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
809
+ import_react_native3.TouchableOpacity,
798
810
  {
799
811
  style: [s.primaryButton, { backgroundColor: acceptBg }],
800
812
  onPress: onRetry,
801
813
  activeOpacity: 0.8,
802
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Try Again" })
814
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Try Again" })
803
815
  }
804
816
  ) : null,
805
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
806
- import_react_native2.TouchableOpacity,
817
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
818
+ import_react_native3.TouchableOpacity,
807
819
  {
808
820
  style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
809
821
  onPress: onBack,
810
822
  activeOpacity: 0.8,
811
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [s.outlineButtonText, { color: declineText }], children: "Go Back" })
823
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.outlineButtonText, { color: declineText }], children: "Go Back" })
812
824
  }
813
825
  )
814
826
  ] });
815
827
  }
816
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
817
- import_react_native2.TouchableOpacity,
828
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
829
+ import_react_native3.TouchableOpacity,
818
830
  {
819
831
  style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
820
832
  onPress: onBack,
821
833
  activeOpacity: 0.8,
822
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [s.outlineButtonText, { color: declineText }], children: "Cancel" })
834
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.outlineButtonText, { color: declineText }], children: "Cancel" })
823
835
  }
824
836
  ) });
825
837
  };
826
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.root, children: [
827
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: [s.topSection, { borderBottomColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [s.topTitle, { color: headingColor }], children: "Guardian Verification" }) }),
828
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: s.centerArea, children: status === "verified" ? renderSuccessContent() : status === "failed" || status === "expired" ? renderErrorContent() : renderPendingContent() }),
838
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.root, children: [
839
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: [s.topSection, { borderBottomColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.topTitle, { color: headingColor }], children: "Guardian Verification" }) }),
840
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: s.centerArea, children: status === "verified" ? renderSuccessContent() : status === "failed" || status === "expired" ? renderErrorContent() : renderPendingContent() }),
829
841
  renderBottomButtons()
830
842
  ] });
831
843
  };
832
- var s = import_react_native2.StyleSheet.create({
844
+ var s = import_react_native3.StyleSheet.create({
833
845
  root: {
834
846
  flex: 1
835
847
  },
@@ -839,7 +851,7 @@ var s = import_react_native2.StyleSheet.create({
839
851
  alignItems: "center",
840
852
  paddingHorizontal: 20,
841
853
  paddingVertical: 16,
842
- borderBottomWidth: import_react_native2.StyleSheet.hairlineWidth,
854
+ borderBottomWidth: import_react_native3.StyleSheet.hairlineWidth,
843
855
  borderBottomColor: "#E5E7EB"
844
856
  },
845
857
  topTitle: {
@@ -947,7 +959,7 @@ var s = import_react_native2.StyleSheet.create({
947
959
  bottomSection: {
948
960
  padding: 20,
949
961
  gap: 8,
950
- borderTopWidth: import_react_native2.StyleSheet.hairlineWidth,
962
+ borderTopWidth: import_react_native3.StyleSheet.hairlineWidth,
951
963
  borderTopColor: "#E5E7EB"
952
964
  },
953
965
  primaryButton: {
@@ -982,10 +994,13 @@ var DPO_AUDIO_ELEMENT_MAP = [
982
994
  { audioKey: "dpo_text_audio_url", elementId: "dpo-dpo-text" },
983
995
  { audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
984
996
  ];
997
+ var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
998
+ var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
999
+ var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
985
1000
 
986
1001
  // src/RedactoNoticeConsent/styles.ts
987
- var import_react_native3 = require("react-native");
988
- var styles2 = import_react_native3.StyleSheet.create({
1002
+ var import_react_native4 = require("react-native");
1003
+ var styles3 = import_react_native4.StyleSheet.create({
989
1004
  overlay: {
990
1005
  flex: 1,
991
1006
  backgroundColor: "rgba(0, 0, 0, 0.5)",
@@ -999,7 +1014,7 @@ var styles2 = import_react_native3.StyleSheet.create({
999
1014
  height: "90%",
1000
1015
  borderRadius: 8,
1001
1016
  backgroundColor: "#ffffff",
1002
- ...import_react_native3.Platform.select({
1017
+ ...import_react_native4.Platform.select({
1003
1018
  ios: {
1004
1019
  shadowColor: "#000",
1005
1020
  shadowOffset: { width: 0, height: 2 },
@@ -1147,6 +1162,29 @@ var styles2 = import_react_native3.StyleSheet.create({
1147
1162
  backgroundColor: "#ffffff",
1148
1163
  flexShrink: 0
1149
1164
  },
1165
+ /**
1166
+ * The main notice footer. Wide: one row with decline pushed left and the
1167
+ * accepts grouped right (see `declineSpacer`). Narrow: a full-width stack.
1168
+ * The guardian-verification and age-gate sub-flows still use
1169
+ * `bottomSection` — they have their own two-button layout.
1170
+ */
1171
+ actionButtonRow: {
1172
+ flexDirection: "row",
1173
+ alignItems: "center",
1174
+ gap: 10,
1175
+ paddingTop: 15,
1176
+ paddingBottom: 16,
1177
+ backgroundColor: "#ffffff",
1178
+ flexShrink: 0
1179
+ },
1180
+ actionButtonStack: {
1181
+ flexDirection: "column",
1182
+ gap: 10,
1183
+ paddingTop: 15,
1184
+ paddingBottom: 16,
1185
+ backgroundColor: "#ffffff",
1186
+ flexShrink: 0
1187
+ },
1150
1188
  button: {
1151
1189
  borderRadius: 8,
1152
1190
  paddingVertical: 9,
@@ -1154,6 +1192,24 @@ var styles2 = import_react_native3.StyleSheet.create({
1154
1192
  alignItems: "center",
1155
1193
  justifyContent: "center"
1156
1194
  },
1195
+ /**
1196
+ * In the wide row each button shrinks to its own label so the left/right
1197
+ * split survives; `flexShrink` lets a long translated label wrap rather than
1198
+ * overflow the modal.
1199
+ */
1200
+ rowButton: {
1201
+ flexShrink: 1,
1202
+ paddingHorizontal: 16
1203
+ },
1204
+ /** In the narrow stack every button spans the full width. */
1205
+ stackButton: {
1206
+ alignSelf: "stretch",
1207
+ paddingHorizontal: 16
1208
+ },
1209
+ /** Pushes everything after decline to the right edge of the wide row. */
1210
+ declineSpacer: {
1211
+ marginRight: "auto"
1212
+ },
1157
1213
  buttonText: {
1158
1214
  fontWeight: "400",
1159
1215
  fontSize: 16,
@@ -1166,6 +1222,19 @@ var styles2 = import_react_native3.StyleSheet.create({
1166
1222
  acceptButtonText: {
1167
1223
  color: "#ffffff"
1168
1224
  },
1225
+ /**
1226
+ * The accept-all shortcut. Outlined rather than filled so the primary
1227
+ * "accept selected" action stays dominant, but tinted with the accent colour
1228
+ * so it still reads as an accept next to the neutral decline button.
1229
+ */
1230
+ acceptSecondaryButton: {
1231
+ borderWidth: 1,
1232
+ borderColor: "#4f87ff",
1233
+ backgroundColor: "#ffffff"
1234
+ },
1235
+ acceptSecondaryButtonText: {
1236
+ color: "#4f87ff"
1237
+ },
1169
1238
  cancelButton: {
1170
1239
  borderWidth: 1,
1171
1240
  borderColor: "#d0d5dd",
@@ -1189,7 +1258,7 @@ var styles2 = import_react_native3.StyleSheet.create({
1189
1258
  minWidth: 120,
1190
1259
  maxHeight: 200,
1191
1260
  marginTop: 4,
1192
- ...import_react_native3.Platform.select({
1261
+ ...import_react_native4.Platform.select({
1193
1262
  ios: {
1194
1263
  shadowColor: "#000",
1195
1264
  shadowOffset: { width: 0, height: 2 },
@@ -1245,9 +1314,6 @@ var styles2 = import_react_native3.StyleSheet.create({
1245
1314
  fontSize: 14,
1246
1315
  flex: 1
1247
1316
  },
1248
- requiredAsterisk: {
1249
- color: "red"
1250
- },
1251
1317
  divider: {
1252
1318
  height: 1,
1253
1319
  backgroundColor: "#e5e7eb",
@@ -1312,10 +1378,28 @@ var styles2 = import_react_native3.StyleSheet.create({
1312
1378
  }
1313
1379
  });
1314
1380
 
1381
+ // src/RedactoNoticeConsent/utils/consentSelection.ts
1382
+ var dataElementKey = (purposeUuid, elementUuid) => `${purposeUuid}-${elementUuid}`;
1383
+ var buildSelectionForMode = (purposes, mode, current) => {
1384
+ if (mode === "selected") {
1385
+ return current;
1386
+ }
1387
+ const selectedPurposes = {};
1388
+ const selectedDataElements = {};
1389
+ purposes.forEach((purpose) => {
1390
+ selectedPurposes[purpose.uuid] = true;
1391
+ purpose.data_elements.forEach((element) => {
1392
+ selectedDataElements[dataElementKey(purpose.uuid, element.uuid)] = element.enabled;
1393
+ });
1394
+ });
1395
+ return { selectedPurposes, selectedDataElements };
1396
+ };
1397
+ var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
1398
+
1315
1399
  // src/RedactoNoticeConsent/useResponsive.ts
1316
- var import_react_native4 = require("react-native");
1400
+ var import_react_native5 = require("react-native");
1317
1401
  var useResponsive = () => {
1318
- const { width, height } = (0, import_react_native4.useWindowDimensions)();
1402
+ const { width, height } = (0, import_react_native5.useWindowDimensions)();
1319
1403
  return {
1320
1404
  isMobile: width < 768,
1321
1405
  width,
@@ -1324,13 +1408,13 @@ var useResponsive = () => {
1324
1408
  };
1325
1409
 
1326
1410
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
1327
- var import_jsx_runtime3 = require("react/jsx-runtime");
1411
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1328
1412
  function RemoteLogo({ uri }) {
1329
1413
  const isSvg = uri.toLowerCase().endsWith(".svg") || uri.toLowerCase().includes("image/svg");
1330
1414
  if (isSvg && import_react_native_svg3.SvgUri) {
1331
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.SvgUri, { uri, width: 32, height: 32 });
1415
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.SvgUri, { uri, width: 32, height: 32 });
1332
1416
  }
1333
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Image, { style: styles2.logo, source: { uri } });
1417
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Image, { style: styles3.logo, source: { uri } });
1334
1418
  }
1335
1419
  function stripHtml(html) {
1336
1420
  return html.replace(/<[^>]*>/g, "").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ").trim();
@@ -1382,17 +1466,17 @@ var PurposeItem = ({
1382
1466
  }) => {
1383
1467
  const headingColor = (settings == null ? void 0 : settings.headingColor) || "#323B4B";
1384
1468
  const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
1385
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { children: [
1386
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.optionItem, children: [
1387
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1388
- import_react_native5.TouchableOpacity,
1469
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { children: [
1470
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.optionItem, children: [
1471
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1472
+ import_react_native6.TouchableOpacity,
1389
1473
  {
1390
- style: styles2.optionLeft,
1474
+ style: styles3.optionLeft,
1391
1475
  onPress: () => onPurposeCollapse(purpose.uuid),
1392
1476
  accessibilityRole: "button",
1393
1477
  accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)} details`,
1394
1478
  children: [
1395
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.purposeChevron, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1479
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.purposeChevron, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1396
1480
  import_react_native_svg3.Path,
1397
1481
  {
1398
1482
  d: "M1 1L6 6L1 11",
@@ -1403,25 +1487,28 @@ var PurposeItem = ({
1403
1487
  transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
1404
1488
  }
1405
1489
  ) }) }),
1406
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.optionTextContainer, children: [
1407
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1408
- import_react_native5.Text,
1490
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.optionTextContainer, children: [
1491
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1492
+ import_react_native6.Text,
1409
1493
  {
1410
1494
  style: [
1411
- styles2.optionTitle,
1495
+ styles3.optionTitle,
1412
1496
  { color: headingColor },
1413
- activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles2.ttsHighlight : null
1497
+ activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles3.ttsHighlight : null
1414
1498
  ],
1415
- children: getTranslatedText("purposes.name", purpose.name, purpose.uuid)
1499
+ children: [
1500
+ getTranslatedText("purposes.name", purpose.name, purpose.uuid),
1501
+ hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
1502
+ ]
1416
1503
  }
1417
1504
  ),
1418
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1419
- import_react_native5.Text,
1505
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1506
+ import_react_native6.Text,
1420
1507
  {
1421
1508
  style: [
1422
- styles2.optionDescription,
1509
+ styles3.optionDescription,
1423
1510
  { color: textColor },
1424
- activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles2.ttsHighlight : null
1511
+ activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles3.ttsHighlight : null
1425
1512
  ],
1426
1513
  children: getTranslatedText("purposes.description", purpose.description, purpose.uuid)
1427
1514
  }
@@ -1430,7 +1517,7 @@ var PurposeItem = ({
1430
1517
  ]
1431
1518
  }
1432
1519
  ),
1433
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1520
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1434
1521
  Checkbox,
1435
1522
  {
1436
1523
  checked: selectedPurposes[purpose.uuid] || false,
@@ -1440,7 +1527,7 @@ var PurposeItem = ({
1440
1527
  accessibilityLabel: `Select all data elements for ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`
1441
1528
  }
1442
1529
  ),
1443
- isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.consentedCheckmark, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1530
+ isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.consentedCheckmark, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1444
1531
  import_react_native_svg3.Path,
1445
1532
  {
1446
1533
  d: "M4 6L5.5 7.5L8.5 4.5",
@@ -1451,22 +1538,22 @@ var PurposeItem = ({
1451
1538
  }
1452
1539
  ) }) })
1453
1540
  ] }),
1454
- !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.dataElementItem, children: [
1455
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1456
- import_react_native5.Text,
1541
+ !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.dataElementItem, children: [
1542
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1543
+ import_react_native6.Text,
1457
1544
  {
1458
1545
  style: [
1459
- styles2.dataElementText,
1546
+ styles3.dataElementText,
1460
1547
  { color: textColor },
1461
- activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles2.ttsHighlight : null
1548
+ activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles3.ttsHighlight : null
1462
1549
  ],
1463
1550
  children: [
1464
1551
  getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
1465
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.requiredAsterisk, children: " *" })
1552
+ dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
1466
1553
  ]
1467
1554
  }
1468
1555
  ),
1469
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1556
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1470
1557
  Checkbox,
1471
1558
  {
1472
1559
  checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
@@ -1478,7 +1565,7 @@ var PurposeItem = ({
1478
1565
  ),
1479
1566
  isAlreadyConsented && (() => {
1480
1567
  const wasSelected = initialDataElementSelections[`${purpose.uuid}-${dataElement.uuid}`] || false;
1481
- return wasSelected ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.consentedCheckmarkSmall, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 10, height: 10, viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1568
+ return wasSelected ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.consentedCheckmarkSmall, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 10, height: 10, viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1482
1569
  import_react_native_svg3.Path,
1483
1570
  {
1484
1571
  d: "M3 5L4.5 6.5L7.5 3.5",
@@ -1487,7 +1574,7 @@ var PurposeItem = ({
1487
1574
  strokeLinecap: "round",
1488
1575
  strokeLinejoin: "round"
1489
1576
  }
1490
- ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.notConsentedCircle });
1577
+ ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.notConsentedCircle });
1491
1578
  })()
1492
1579
  ] }, dataElement.uuid)) })
1493
1580
  ] });
@@ -1498,48 +1585,48 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1498
1585
  const borderColor = (settings == null ? void 0 : settings.borderColor) || "#d0d5dd";
1499
1586
  const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
1500
1587
  const [showRelationshipDropdown, setShowRelationshipDropdown] = (0, import_react2.useState)(false);
1501
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1502
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.topSection, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topLeft, children: [
1503
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
1504
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Guardian Verification" })
1588
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1589
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.topSection, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topLeft, children: [
1590
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
1591
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Guardian Verification" })
1505
1592
  ] }) }),
1506
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.divider }),
1507
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.ScrollView, { style: styles2.middleSection, showsVerticalScrollIndicator: false, children: [
1508
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.privacyText, { color: textColor, fontSize: 13, lineHeight: 20 }], children: "Since you are under the age of consent, a legal guardian must verify their identity via DigiLocker before consent can be provided on your behalf." }),
1509
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: guardianStyles.infoBanner, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: guardianStyles.infoBannerText, children: "Please ensure the name and phone number entered below match the guardian's official Aadhaar-linked records for successful verification." }) }),
1510
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: { marginTop: 16, gap: 12 }, children: [
1511
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.inputContainer, children: [
1512
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: [styles2.inputLabel, { color: textColor }], children: [
1593
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.divider }),
1594
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
1595
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.privacyText, { color: textColor, fontSize: 13, lineHeight: 20 }], children: "Since you are under the age of consent, a legal guardian must verify their identity via DigiLocker before consent can be provided on your behalf." }),
1596
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: guardianStyles.infoBanner, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: guardianStyles.infoBannerText, children: "Please ensure the name and phone number entered below match the guardian's official Aadhaar-linked records for successful verification." }) }),
1597
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: { marginTop: 16, gap: 12 }, children: [
1598
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.inputContainer, children: [
1599
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.inputLabel, { color: textColor }], children: [
1513
1600
  "Guardian's Full Name ",
1514
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: { color: "red" }, children: "*" })
1601
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: "red" }, children: "*" })
1515
1602
  ] }),
1516
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1517
- import_react_native5.TextInput,
1603
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1604
+ import_react_native6.TextInput,
1518
1605
  {
1519
1606
  value: formData.guardianName,
1520
1607
  onChangeText: (v) => onChange("guardianName", v),
1521
1608
  style: [
1522
- styles2.textInput,
1609
+ styles3.textInput,
1523
1610
  { borderColor: errors.guardianName ? "#DC2626" : borderColor, color: textColor }
1524
1611
  ],
1525
1612
  placeholder: "e.g. Rajesh Kumar",
1526
1613
  placeholderTextColor: "#9CA3AF"
1527
1614
  }
1528
1615
  ),
1529
- errors.guardianName ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.inputError, children: errors.guardianName }) : null
1616
+ errors.guardianName ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.inputError, children: errors.guardianName }) : null
1530
1617
  ] }),
1531
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.inputContainer, children: [
1532
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: [styles2.inputLabel, { color: textColor }], children: [
1618
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.inputContainer, children: [
1619
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.inputLabel, { color: textColor }], children: [
1533
1620
  "Guardian's Phone Number ",
1534
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: { color: "red" }, children: "*" })
1621
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: "red" }, children: "*" })
1535
1622
  ] }),
1536
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1537
- import_react_native5.TextInput,
1623
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1624
+ import_react_native6.TextInput,
1538
1625
  {
1539
1626
  value: formData.guardianContact,
1540
1627
  onChangeText: (v) => onChange("guardianContact", v),
1541
1628
  style: [
1542
- styles2.textInput,
1629
+ styles3.textInput,
1543
1630
  { borderColor: errors.guardianContact ? "#DC2626" : borderColor, color: textColor }
1544
1631
  ],
1545
1632
  placeholder: "e.g. 9876543210",
@@ -1547,20 +1634,20 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1547
1634
  keyboardType: "phone-pad"
1548
1635
  }
1549
1636
  ),
1550
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: { fontSize: 11, color: "#667085", marginTop: 4 }, children: "Mobile number linked to guardian's Aadhaar" }),
1551
- errors.guardianContact ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.inputError, children: errors.guardianContact }) : null
1637
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { fontSize: 11, color: "#667085", marginTop: 4 }, children: "Mobile number linked to guardian's Aadhaar" }),
1638
+ errors.guardianContact ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.inputError, children: errors.guardianContact }) : null
1552
1639
  ] }),
1553
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.inputContainer, children: [
1554
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: [styles2.inputLabel, { color: textColor }], children: [
1640
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.inputContainer, children: [
1641
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.inputLabel, { color: textColor }], children: [
1555
1642
  "Relationship ",
1556
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: { color: "red" }, children: "*" })
1643
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: "red" }, children: "*" })
1557
1644
  ] }),
1558
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: { position: "relative" }, children: [
1559
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1560
- import_react_native5.TouchableOpacity,
1645
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: { position: "relative" }, children: [
1646
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1647
+ import_react_native6.TouchableOpacity,
1561
1648
  {
1562
1649
  style: [
1563
- styles2.textInput,
1650
+ styles3.textInput,
1564
1651
  {
1565
1652
  borderColor: errors.guardianRelationship ? "#DC2626" : borderColor,
1566
1653
  flexDirection: "row",
@@ -1570,8 +1657,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1570
1657
  ],
1571
1658
  onPress: () => setShowRelationshipDropdown((v) => !v),
1572
1659
  children: [
1573
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: { color: formData.guardianRelationship ? textColor : "#9CA3AF", fontSize: 13 }, children: formData.guardianRelationship || "Select relationship" }),
1574
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1660
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: formData.guardianRelationship ? textColor : "#9CA3AF", fontSize: 13 }, children: formData.guardianRelationship || "Select relationship" }),
1661
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1575
1662
  import_react_native_svg3.Path,
1576
1663
  {
1577
1664
  d: "M4 6L8 10L12 6",
@@ -1584,8 +1671,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1584
1671
  ]
1585
1672
  }
1586
1673
  ),
1587
- showRelationshipDropdown && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: guardianStyles.relationshipDropdown, children: RELATIONSHIP_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1588
- import_react_native5.TouchableOpacity,
1674
+ showRelationshipDropdown && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: guardianStyles.relationshipDropdown, children: RELATIONSHIP_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1675
+ import_react_native6.TouchableOpacity,
1589
1676
  {
1590
1677
  style: [
1591
1678
  guardianStyles.relationshipItem,
@@ -1595,41 +1682,41 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1595
1682
  onChange("guardianRelationship", option);
1596
1683
  setShowRelationshipDropdown(false);
1597
1684
  },
1598
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [guardianStyles.relationshipItemText, { color: textColor }], children: option })
1685
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [guardianStyles.relationshipItemText, { color: textColor }], children: option })
1599
1686
  },
1600
1687
  option
1601
1688
  )) })
1602
1689
  ] }),
1603
- errors.guardianRelationship ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.inputError, children: errors.guardianRelationship }) : null
1690
+ errors.guardianRelationship ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.inputError, children: errors.guardianRelationship }) : null
1604
1691
  ] }),
1605
- errors.general ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.errorContainer, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.errorText, children: errors.general }) }) : null
1692
+ errors.general ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.errorContainer, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.errorText, children: errors.general }) }) : null
1606
1693
  ] })
1607
1694
  ] }),
1608
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.bottomSection, children: [
1609
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1610
- import_react_native5.TouchableOpacity,
1695
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.bottomSection, children: [
1696
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1697
+ import_react_native6.TouchableOpacity,
1611
1698
  {
1612
1699
  style: [
1613
- styles2.button,
1614
- styles2.acceptButton,
1700
+ styles3.button,
1701
+ styles3.acceptButton,
1615
1702
  ((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
1616
1703
  ],
1617
1704
  onPress: onNext,
1618
1705
  disabled: isSubmitting,
1619
1706
  accessibilityLabel: "Submit guardian information and proceed",
1620
- children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.ActivityIndicator, { size: "small", color: ((_c = (_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) == null ? void 0 : _c.textColor) || "#ffffff" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1621
- styles2.buttonText,
1622
- styles2.acceptButtonText,
1707
+ children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ActivityIndicator, { size: "small", color: ((_c = (_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) == null ? void 0 : _c.textColor) || "#ffffff" }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1708
+ styles3.buttonText,
1709
+ styles3.acceptButtonText,
1623
1710
  ((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.accept) ? { color: settings.button.accept.textColor } : null
1624
1711
  ], children: "Verify via DigiLocker" })
1625
1712
  }
1626
1713
  ),
1627
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1628
- import_react_native5.TouchableOpacity,
1714
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1715
+ import_react_native6.TouchableOpacity,
1629
1716
  {
1630
1717
  style: [
1631
- styles2.button,
1632
- styles2.cancelButton,
1718
+ styles3.button,
1719
+ styles3.cancelButton,
1633
1720
  ((_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) ? {
1634
1721
  backgroundColor: settings.button.decline.backgroundColor,
1635
1722
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
@@ -1638,9 +1725,9 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1638
1725
  onPress: onDecline,
1639
1726
  disabled: isSubmitting,
1640
1727
  accessibilityLabel: "Cancel guardian information form",
1641
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1642
- styles2.buttonText,
1643
- styles2.cancelButtonText,
1728
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1729
+ styles3.buttonText,
1730
+ styles3.cancelButtonText,
1644
1731
  ((_f = settings == null ? void 0 : settings.button) == null ? void 0 : _f.decline) ? { color: settings.button.decline.textColor } : null
1645
1732
  ], children: "Cancel" })
1646
1733
  }
@@ -1648,7 +1735,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1648
1735
  ] })
1649
1736
  ] });
1650
1737
  };
1651
- var guardianStyles = import_react_native5.StyleSheet.create({
1738
+ var guardianStyles = import_react_native6.StyleSheet.create({
1652
1739
  infoBanner: {
1653
1740
  backgroundColor: "#EFF6FF",
1654
1741
  borderWidth: 1,
@@ -1690,43 +1777,43 @@ var guardianStyles = import_react_native5.StyleSheet.create({
1690
1777
  });
1691
1778
  var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
1692
1779
  var _a, _b, _c, _d;
1693
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1694
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topSection, children: [
1695
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topLeft, children: [
1696
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
1697
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Age Verification Required" })
1780
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1781
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topSection, children: [
1782
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topLeft, children: [
1783
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
1784
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Age Verification Required" })
1698
1785
  ] }),
1699
- onClose ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.TouchableOpacity, { onPress: onClose, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.Path, { d: "M18 6L6 18M6 6l12 12", stroke: "#9CA3AF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : null
1786
+ onClose ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.TouchableOpacity, { onPress: onClose, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.Path, { d: "M18 6L6 18M6 6l12 12", stroke: "#9CA3AF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : null
1700
1787
  ] }),
1701
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.divider }),
1702
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.ScrollView, { style: styles2.middleSection, showsVerticalScrollIndicator: false, children: [
1703
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054" }], children: "To proceed with this consent form, we need to verify your age." }),
1704
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054", marginTop: 12, fontWeight: "600" }], children: "Are you 18 years of age or older?" })
1788
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.divider }),
1789
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
1790
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054" }], children: "To proceed with this consent form, we need to verify your age." }),
1791
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054", marginTop: 12, fontWeight: "600" }], children: "Are you 18 years of age or older?" })
1705
1792
  ] }),
1706
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.bottomSection, children: [
1707
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1708
- import_react_native5.TouchableOpacity,
1793
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.bottomSection, children: [
1794
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1795
+ import_react_native6.TouchableOpacity,
1709
1796
  {
1710
1797
  style: [
1711
- styles2.button,
1712
- styles2.acceptButton,
1798
+ styles3.button,
1799
+ styles3.acceptButton,
1713
1800
  ((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
1714
1801
  ],
1715
1802
  onPress: onYes,
1716
1803
  accessibilityLabel: "Yes, I am 18 or older",
1717
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1718
- styles2.buttonText,
1719
- styles2.acceptButtonText,
1804
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1805
+ styles3.buttonText,
1806
+ styles3.acceptButtonText,
1720
1807
  ((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) ? { color: settings.button.accept.textColor } : null
1721
1808
  ], children: "Yes, I am 18 or older" })
1722
1809
  }
1723
1810
  ),
1724
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1725
- import_react_native5.TouchableOpacity,
1811
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1812
+ import_react_native6.TouchableOpacity,
1726
1813
  {
1727
1814
  style: [
1728
- styles2.button,
1729
- styles2.cancelButton,
1815
+ styles3.button,
1816
+ styles3.cancelButton,
1730
1817
  ((_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.decline) ? {
1731
1818
  backgroundColor: settings.button.decline.backgroundColor,
1732
1819
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
@@ -1734,9 +1821,9 @@ var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
1734
1821
  ],
1735
1822
  onPress: onNo,
1736
1823
  accessibilityLabel: "No, I am under 18",
1737
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1738
- styles2.buttonText,
1739
- styles2.cancelButtonText,
1824
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1825
+ styles3.buttonText,
1826
+ styles3.cancelButtonText,
1740
1827
  ((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.decline) ? { color: settings.button.decline.textColor } : null
1741
1828
  ], children: "No, I am under 18" })
1742
1829
  }
@@ -1767,7 +1854,7 @@ var RedactoNoticeConsent = ({
1767
1854
  includeFullyConsentedData = false,
1768
1855
  reviewModeButtonText
1769
1856
  }) => {
1770
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
1857
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
1771
1858
  const { isMobile } = useResponsive();
1772
1859
  const sandboxParams = (0, import_react2.useMemo)(
1773
1860
  () => ({
@@ -1945,6 +2032,9 @@ var RedactoNoticeConsent = ({
1945
2032
  confirm_button_text: data.detail.confirm_button_text_audio_url,
1946
2033
  decline_button_text: data.detail.decline_button_text_audio_url
1947
2034
  };
2035
+ if (data.detail.accept_all_button_text_audio_url) {
2036
+ urls.accept_all_button_text = data.detail.accept_all_button_text_audio_url;
2037
+ }
1948
2038
  if (data.detail.privacy_center_anchor_text_audio_url) {
1949
2039
  urls.privacy_center_anchor_text = data.detail.privacy_center_anchor_text_audio_url;
1950
2040
  }
@@ -2154,6 +2244,7 @@ var RedactoNoticeConsent = ({
2154
2244
  DPO_AUDIO_ELEMENT_MAP.forEach(({ elementId }) => {
2155
2245
  pushSegment(elementId, ttsAudioUrls[elementId]);
2156
2246
  });
2247
+ pushSegment("accept_all_button_text", ttsAudioUrls.accept_all_button_text);
2157
2248
  pushSegment("confirm_button_text", ttsAudioUrls.confirm_button_text);
2158
2249
  pushSegment("decline_button_text", ttsAudioUrls.decline_button_text);
2159
2250
  if (queue.length === 0) {
@@ -2194,7 +2285,7 @@ var RedactoNoticeConsent = ({
2194
2285
  };
2195
2286
  }, [stopAudio]);
2196
2287
  (0, import_react2.useEffect)(() => {
2197
- const subscription = import_react_native5.AppState.addEventListener("change", (nextAppState) => {
2288
+ const subscription = import_react_native6.AppState.addEventListener("change", (nextAppState) => {
2198
2289
  isAppActiveRef.current = nextAppState === "active";
2199
2290
  });
2200
2291
  return () => subscription.remove();
@@ -2305,12 +2396,20 @@ var RedactoNoticeConsent = ({
2305
2396
  return newState;
2306
2397
  });
2307
2398
  }, [content]);
2308
- const handleAccept = (0, import_react2.useCallback)(async () => {
2399
+ const handleAccept = (0, import_react2.useCallback)(async (mode = "selected") => {
2309
2400
  if (!content) return;
2310
2401
  try {
2311
2402
  setIsSubmitting(true);
2312
2403
  setErrorMessage(null);
2313
2404
  const activeConfig2 = content.detail.active_config;
2405
+ const selection = buildSelectionForMode(activeConfig2.purposes, mode, {
2406
+ selectedPurposes,
2407
+ selectedDataElements
2408
+ });
2409
+ if (mode !== "selected") {
2410
+ setSelectedPurposes(selection.selectedPurposes);
2411
+ setSelectedDataElements(selection.selectedDataElements);
2412
+ }
2314
2413
  await submitConsentEvent({
2315
2414
  accessToken,
2316
2415
  baseUrl,
@@ -2318,10 +2417,10 @@ var RedactoNoticeConsent = ({
2318
2417
  noticeUuid: activeConfig2.notice_uuid,
2319
2418
  purposes: activeConfig2.purposes.map((purpose) => ({
2320
2419
  ...purpose,
2321
- selected: selectedPurposes[purpose.uuid] || false,
2420
+ selected: selection.selectedPurposes[purpose.uuid] || false,
2322
2421
  data_elements: purpose.data_elements.map((el) => ({
2323
2422
  ...el,
2324
- selected: selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
2423
+ selected: selection.selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
2325
2424
  }))
2326
2425
  })),
2327
2426
  declined: false,
@@ -2386,9 +2485,9 @@ var RedactoNoticeConsent = ({
2386
2485
  setShowVerificationScreen(true);
2387
2486
  pollingCountRef.current = 0;
2388
2487
  try {
2389
- const canOpen = await import_react_native5.Linking.canOpenURL(result.digilockerRedirectUrl);
2488
+ const canOpen = await import_react_native6.Linking.canOpenURL(result.digilockerRedirectUrl);
2390
2489
  if (canOpen) {
2391
- await import_react_native5.Linking.openURL(result.digilockerRedirectUrl);
2490
+ await import_react_native6.Linking.openURL(result.digilockerRedirectUrl);
2392
2491
  }
2393
2492
  } catch {
2394
2493
  }
@@ -2450,41 +2549,71 @@ var RedactoNoticeConsent = ({
2450
2549
  }, [activeConfig, selectedDataElements]);
2451
2550
  const acceptButtonStyle = { backgroundColor: acceptBackgroundColor };
2452
2551
  const acceptButtonTextStyle = { color: acceptTextColor };
2552
+ const acceptAllButtonStyle = {
2553
+ backgroundColor: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.acceptAll) == null ? void 0 : _j.backgroundColor) || acceptBackgroundColor
2554
+ };
2555
+ const acceptAllButtonTextStyle = {
2556
+ color: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.acceptAll) == null ? void 0 : _l.textColor) || acceptTextColor
2557
+ };
2558
+ const acceptSelectedButtonStyle = {
2559
+ backgroundColor: "#ffffff",
2560
+ borderColor: accentColor
2561
+ };
2562
+ const acceptSelectedButtonTextStyle = { color: accentColor };
2453
2563
  const declineButtonStyle = { backgroundColor: declineBackgroundColor, borderColor };
2454
2564
  const declineButtonTextStyle = { color: declineTextColor };
2565
+ const acceptAllLabel = getTranslatedText(
2566
+ "accept_all_button_text",
2567
+ (activeConfig == null ? void 0 : activeConfig.accept_all_button_text) || DEFAULT_ACCEPT_ALL_BUTTON_TEXT
2568
+ );
2569
+ const acceptSelectedLabel = getTranslatedText(
2570
+ "confirm_button_text",
2571
+ (activeConfig == null ? void 0 : activeConfig.confirm_button_text) || DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT
2572
+ );
2573
+ const declineLabel = getTranslatedText(
2574
+ "decline_button_text",
2575
+ (activeConfig == null ? void 0 : activeConfig.decline_button_text) || DEFAULT_DECLINE_BUTTON_TEXT
2576
+ );
2577
+ const footerButtonOrder = isMobile ? ["acceptAll", "acceptSelected", "decline"] : ["decline", "acceptSelected", "acceptAll"];
2578
+ const widthStyle = isMobile ? styles3.stackButton : styles3.rowButton;
2579
+ const handleAcceptAll = (0, import_react2.useCallback)(() => handleAccept("all"), [handleAccept]);
2580
+ const handleAcceptSelected = (0, import_react2.useCallback)(
2581
+ () => handleAccept("selected"),
2582
+ [handleAccept]
2583
+ );
2455
2584
  const modalBg = (settings == null ? void 0 : settings.backgroundColor) ? { backgroundColor: settings.backgroundColor } : {};
2456
2585
  const translatedNoticeText = activeConfig ? stripHtml(getTranslatedText("notice_text", activeConfig.notice_text || "")) : "";
2457
2586
  const translatedAdditionalText = activeConfig ? stripHtml(getTranslatedText("additional_text", activeConfig.additional_text || "")) : "";
2458
2587
  if (!isVisible && !isLoading) return null;
2459
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2460
- import_react_native5.Modal,
2588
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2589
+ import_react_native6.Modal,
2461
2590
  {
2462
2591
  visible: isVisible || isLoading,
2463
2592
  transparent: true,
2464
2593
  animationType: "fade",
2465
2594
  onRequestClose: blockUI ? void 0 : handleDecline,
2466
2595
  accessibilityViewIsModal: true,
2467
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.overlay, children: [
2468
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2469
- import_react_native5.Pressable,
2596
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.overlay, children: [
2597
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2598
+ import_react_native6.Pressable,
2470
2599
  {
2471
- style: [import_react_native5.StyleSheet.absoluteFillObject, { zIndex: 1 }],
2600
+ style: [import_react_native6.StyleSheet.absoluteFillObject, { zIndex: 1 }],
2472
2601
  onPress: () => setIsLanguageDropdownOpen(false)
2473
2602
  }
2474
2603
  ),
2475
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2476
- import_react_native5.View,
2604
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2605
+ import_react_native6.View,
2477
2606
  {
2478
2607
  style: [
2479
- styles2.modal,
2608
+ styles3.modal,
2480
2609
  modalBg,
2481
2610
  { zIndex: 2 },
2482
2611
  (settings == null ? void 0 : settings.borderRadius) ? { borderRadius: parseInt(settings.borderRadius, 10) } : null
2483
2612
  ],
2484
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.loadingContainer, children: [
2485
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.ActivityIndicator, { size: "large", color: acceptBackgroundColor }),
2486
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.loadingText, children: "Loading..." })
2487
- ] }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.content, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2613
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.loadingContainer, children: [
2614
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ActivityIndicator, { size: "large", color: acceptBackgroundColor }),
2615
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.loadingText, children: "Loading..." })
2616
+ ] }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.content, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2488
2617
  VerificationScreen,
2489
2618
  {
2490
2619
  status: verificationStatus,
@@ -2521,7 +2650,7 @@ var RedactoNoticeConsent = ({
2521
2650
  }
2522
2651
  }
2523
2652
  }
2524
- ) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.content, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2653
+ ) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.content, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2525
2654
  GuardianForm,
2526
2655
  {
2527
2656
  formData: guardianFormData,
@@ -2548,7 +2677,7 @@ var RedactoNoticeConsent = ({
2548
2677
  },
2549
2678
  logoUrl
2550
2679
  }
2551
- ) }) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.content, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2680
+ ) }) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.content, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2552
2681
  AgeVerification,
2553
2682
  {
2554
2683
  onYes: () => {
@@ -2576,22 +2705,22 @@ var RedactoNoticeConsent = ({
2576
2705
  },
2577
2706
  logoUrl
2578
2707
  }
2579
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.content, children: [
2580
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.errorContainer, children: [
2581
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.errorText, children: errorMessage }),
2582
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.TouchableOpacity, { onPress: () => setErrorMessage(null), hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.Path, { d: "M12 4L4 12M4 4L12 12", stroke: "#DC2626", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) })
2708
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.content, children: [
2709
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.errorContainer, children: [
2710
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.errorText, children: errorMessage }),
2711
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.TouchableOpacity, { onPress: () => setErrorMessage(null), hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.Path, { d: "M12 4L4 12M4 4L12 12", stroke: "#DC2626", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) })
2583
2712
  ] }) : null,
2584
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topSection, children: [
2585
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topLeft, children: [
2586
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
2587
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2588
- import_react_native5.Text,
2713
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topSection, children: [
2714
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topLeft, children: [
2715
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
2716
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2717
+ import_react_native6.Text,
2589
2718
  {
2590
2719
  style: [
2591
- styles2.title,
2720
+ styles3.title,
2592
2721
  { color: headingColor },
2593
2722
  isMobile ? { fontSize: 16 } : null,
2594
- activeTTSSegmentKey === "notice_banner_heading" ? styles2.ttsHighlight : null
2723
+ activeTTSSegmentKey === "notice_banner_heading" ? styles3.ttsHighlight : null
2595
2724
  ],
2596
2725
  numberOfLines: 2,
2597
2726
  children: getTranslatedText(
@@ -2601,32 +2730,32 @@ var RedactoNoticeConsent = ({
2601
2730
  }
2602
2731
  )
2603
2732
  ] }),
2604
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: 8, alignItems: "center" }, children: [
2605
- isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2606
- import_react_native5.TouchableOpacity,
2733
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: { flexDirection: "row", gap: 8, alignItems: "center" }, children: [
2734
+ isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2735
+ import_react_native6.TouchableOpacity,
2607
2736
  {
2608
- style: [styles2.topRight, ((_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null],
2737
+ style: [styles3.topRight, ((_m = settings == null ? void 0 : settings.button) == null ? void 0 : _m.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null],
2609
2738
  onPress: toggleAudio,
2610
2739
  accessibilityLabel: isPlaying && !isPaused ? "Pause audio" : isPaused ? "Resume audio" : "Start audio",
2611
- children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
2612
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.Rect, { x: "6", y: "4", width: "4", height: "16", fill: ((_k = (_j = settings == null ? void 0 : settings.button) == null ? void 0 : _j.language) == null ? void 0 : _k.textColor) || "#344054" }),
2613
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.Rect, { x: "14", y: "4", width: "4", height: "16", fill: ((_m = (_l = settings == null ? void 0 : settings.button) == null ? void 0 : _l.language) == null ? void 0 : _m.textColor) || "#344054" })
2614
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
2615
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2740
+ children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
2741
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.Rect, { x: "6", y: "4", width: "4", height: "16", fill: ((_o = (_n = settings == null ? void 0 : settings.button) == null ? void 0 : _n.language) == null ? void 0 : _o.textColor) || "#344054" }),
2742
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.Rect, { x: "14", y: "4", width: "4", height: "16", fill: ((_q = (_p = settings == null ? void 0 : settings.button) == null ? void 0 : _p.language) == null ? void 0 : _q.textColor) || "#344054" })
2743
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
2744
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2616
2745
  import_react_native_svg3.Path,
2617
2746
  {
2618
2747
  d: "M11 5L6 9H2V15H6L11 19V5Z",
2619
- stroke: ((_o = (_n = settings == null ? void 0 : settings.button) == null ? void 0 : _n.language) == null ? void 0 : _o.textColor) || "#344054",
2748
+ stroke: ((_s = (_r = settings == null ? void 0 : settings.button) == null ? void 0 : _r.language) == null ? void 0 : _s.textColor) || "#344054",
2620
2749
  strokeWidth: 2,
2621
2750
  strokeLinecap: "round",
2622
2751
  strokeLinejoin: "round"
2623
2752
  }
2624
2753
  ),
2625
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2754
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2626
2755
  import_react_native_svg3.Path,
2627
2756
  {
2628
2757
  d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",
2629
- stroke: ((_q = (_p = settings == null ? void 0 : settings.button) == null ? void 0 : _p.language) == null ? void 0 : _q.textColor) || "#344054",
2758
+ stroke: ((_u = (_t = settings == null ? void 0 : settings.button) == null ? void 0 : _t.language) == null ? void 0 : _u.textColor) || "#344054",
2630
2759
  strokeWidth: 2,
2631
2760
  strokeLinecap: "round",
2632
2761
  strokeLinejoin: "round"
@@ -2635,23 +2764,23 @@ var RedactoNoticeConsent = ({
2635
2764
  ] })
2636
2765
  }
2637
2766
  ),
2638
- supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.languageSelectorContainer, children: [
2639
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2640
- import_react_native5.TouchableOpacity,
2767
+ supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.languageSelectorContainer, children: [
2768
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2769
+ import_react_native6.TouchableOpacity,
2641
2770
  {
2642
2771
  style: [
2643
- styles2.topRight,
2644
- ((_r = settings == null ? void 0 : settings.button) == null ? void 0 : _r.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
2772
+ styles3.topRight,
2773
+ ((_v = settings == null ? void 0 : settings.button) == null ? void 0 : _v.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
2645
2774
  ],
2646
2775
  onPress: () => setIsLanguageDropdownOpen((v) => !v),
2647
2776
  accessibilityLabel: `Select language. Current: ${selectedLanguage}`,
2648
2777
  children: [
2649
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.topRightText, ((_s = settings == null ? void 0 : settings.button) == null ? void 0 : _s.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
2650
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2778
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.topRightText, ((_w = settings == null ? void 0 : settings.button) == null ? void 0 : _w.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
2779
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2651
2780
  import_react_native_svg3.Path,
2652
2781
  {
2653
2782
  d: "M4 6L8 10L12 6",
2654
- stroke: ((_u = (_t = settings == null ? void 0 : settings.button) == null ? void 0 : _t.language) == null ? void 0 : _u.textColor) || "#344054",
2783
+ stroke: ((_y = (_x = settings == null ? void 0 : settings.button) == null ? void 0 : _x.language) == null ? void 0 : _y.textColor) || "#344054",
2655
2784
  strokeWidth: 2,
2656
2785
  strokeLinecap: "round",
2657
2786
  strokeLinejoin: "round"
@@ -2660,23 +2789,23 @@ var RedactoNoticeConsent = ({
2660
2789
  ]
2661
2790
  }
2662
2791
  ),
2663
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.languageDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2664
- import_react_native5.TouchableOpacity,
2792
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.languageDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2793
+ import_react_native6.TouchableOpacity,
2665
2794
  {
2666
2795
  style: [
2667
- styles2.languageItem,
2668
- lang === selectedLanguage ? styles2.selectedLanguageItem : null
2796
+ styles3.languageItem,
2797
+ lang === selectedLanguage ? styles3.selectedLanguageItem : null
2669
2798
  ],
2670
2799
  onPress: () => {
2671
2800
  setSelectedLanguage(lang);
2672
2801
  setIsLanguageDropdownOpen(false);
2673
2802
  },
2674
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2675
- import_react_native5.Text,
2803
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2804
+ import_react_native6.Text,
2676
2805
  {
2677
2806
  style: [
2678
- styles2.languageItemText,
2679
- lang === selectedLanguage ? styles2.selectedLanguageItemText : null
2807
+ styles3.languageItemText,
2808
+ lang === selectedLanguage ? styles3.selectedLanguageItemText : null
2680
2809
  ],
2681
2810
  children: lang
2682
2811
  }
@@ -2687,63 +2816,63 @@ var RedactoNoticeConsent = ({
2687
2816
  ] })
2688
2817
  ] })
2689
2818
  ] }),
2690
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.ScrollView, { style: styles2.middleSection, showsVerticalScrollIndicator: false, children: [
2691
- translatedNoticeText ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2692
- import_react_native5.Text,
2819
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
2820
+ translatedNoticeText ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2821
+ import_react_native6.Text,
2693
2822
  {
2694
2823
  style: [
2695
- styles2.privacyText,
2824
+ styles3.privacyText,
2696
2825
  { color: textColor },
2697
- activeTTSSegmentKey === "notice_text" ? styles2.ttsHighlight : null
2826
+ activeTTSSegmentKey === "notice_text" ? styles3.ttsHighlight : null
2698
2827
  ],
2699
2828
  children: translatedNoticeText
2700
2829
  }
2701
2830
  ) : null,
2702
- (activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2703
- import_react_native5.Text,
2831
+ (activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2832
+ import_react_native6.Text,
2704
2833
  {
2705
2834
  style: [
2706
- styles2.privacyText,
2835
+ styles3.privacyText,
2707
2836
  { marginTop: 8 },
2708
2837
  { color: textColor }
2709
2838
  ],
2710
2839
  children: [
2711
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: activeTTSSegmentKey === "privacy_policy_prefix_text" ? styles2.ttsHighlight : null, children: [
2840
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "privacy_policy_prefix_text" ? styles3.ttsHighlight : null, children: [
2712
2841
  getTranslatedText("privacy_policy_prefix_text", activeConfig.privacy_policy_prefix_text || ""),
2713
2842
  " "
2714
2843
  ] }),
2715
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2716
- import_react_native5.Text,
2844
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2845
+ import_react_native6.Text,
2717
2846
  {
2718
2847
  style: [
2719
- styles2.link,
2848
+ styles3.link,
2720
2849
  { color: linkColor },
2721
- activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles2.ttsHighlight : null
2850
+ activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles3.ttsHighlight : null
2722
2851
  ],
2723
- onPress: () => import_react_native5.Linking.openURL(activeConfig.privacy_policy_url),
2852
+ onPress: () => import_react_native6.Linking.openURL(activeConfig.privacy_policy_url),
2724
2853
  children: getTranslatedText("privacy_policy_anchor_text", activeConfig.privacy_policy_anchor_text || "Privacy Policy")
2725
2854
  }
2726
2855
  )
2727
2856
  ]
2728
2857
  }
2729
2858
  ) : null,
2730
- (activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2731
- import_react_native5.Text,
2859
+ (activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2860
+ import_react_native6.Text,
2732
2861
  {
2733
2862
  style: [
2734
- styles2.subTitle,
2863
+ styles3.subTitle,
2735
2864
  { marginTop: 16, marginBottom: 8 },
2736
2865
  { color: headingColor },
2737
- activeTTSSegmentKey === "purpose_section_heading" ? styles2.ttsHighlight : null
2866
+ activeTTSSegmentKey === "purpose_section_heading" ? styles3.ttsHighlight : null
2738
2867
  ],
2739
2868
  children: getTranslatedText("purpose_section_heading", activeConfig.purpose_section_heading || "Data Purposes")
2740
2869
  }
2741
2870
  ) : null,
2742
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.optionsContainer, children: activeConfig == null ? void 0 : activeConfig.purposes.map((purpose) => {
2871
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.optionsContainer, children: activeConfig == null ? void 0 : activeConfig.purposes.map((purpose) => {
2743
2872
  var _a2;
2744
2873
  const purposeSelection = (_a2 = content == null ? void 0 : content.detail.purpose_selections) == null ? void 0 : _a2[purpose.uuid];
2745
2874
  const isAlreadyConsented = !isReconsentMode && ((purposeSelection == null ? void 0 : purposeSelection.selected) || false) && !(purposeSelection == null ? void 0 : purposeSelection.needs_reconsent);
2746
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2875
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2747
2876
  PurposeItem,
2748
2877
  {
2749
2878
  purpose,
@@ -2776,95 +2905,95 @@ var RedactoNoticeConsent = ({
2776
2905
  }
2777
2906
  return fallback;
2778
2907
  };
2779
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: { marginTop: 8, paddingTop: 8, borderTopWidth: 1, borderTopColor: "rgba(152, 162, 179, 0.3)", opacity: 0.6 }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: [styles2.privacyText, { fontSize: 14, color: dpoTextColor }], children: [
2780
- translatedAdditionalText ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: activeTTSSegmentKey === "additional_text" ? styles2.ttsHighlight : null, children: [
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: { marginTop: 8, paddingTop: 8, borderTopWidth: 1, borderTopColor: "rgba(152, 162, 179, 0.3)", opacity: 0.6 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.privacyText, { fontSize: 14, color: dpoTextColor }], children: [
2909
+ translatedAdditionalText ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "additional_text" ? styles3.ttsHighlight : null, children: [
2781
2910
  translatedAdditionalText,
2782
2911
  " "
2783
2912
  ] }) : null,
2784
- (activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2785
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2786
- import_react_native5.Text,
2913
+ (activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2914
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2915
+ import_react_native6.Text,
2787
2916
  {
2788
2917
  style: [
2789
- styles2.link,
2918
+ styles3.link,
2790
2919
  { color: linkColor },
2791
- activeTTSSegmentKey === "privacy_center_anchor_text" ? styles2.ttsHighlight : null
2920
+ activeTTSSegmentKey === "privacy_center_anchor_text" ? styles3.ttsHighlight : null
2792
2921
  ],
2793
- onPress: () => import_react_native5.Linking.openURL(activeConfig.privacy_center_url),
2922
+ onPress: () => import_react_native6.Linking.openURL(activeConfig.privacy_center_url),
2794
2923
  children: getTranslatedText("privacy_center_anchor_text", activeConfig.privacy_center_anchor_text || "Privacy Center")
2795
2924
  }
2796
2925
  ),
2797
2926
  ".\n"
2798
2927
  ] }) : null,
2799
- (dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2800
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: activeTTSSegmentKey === "dpo-grievance-text" ? styles2.ttsHighlight : null, children: [
2928
+ (dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2929
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-grievance-text" ? styles3.ttsHighlight : null, children: [
2801
2930
  getT("grievance_text", dpo.grievance_text),
2802
2931
  " "
2803
2932
  ] }),
2804
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2805
- import_react_native5.Text,
2933
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2934
+ import_react_native6.Text,
2806
2935
  {
2807
2936
  style: [
2808
- styles2.link,
2937
+ styles3.link,
2809
2938
  { color: linkColor },
2810
- activeTTSSegmentKey === "dpo-grievance-link" ? styles2.ttsHighlight : null
2939
+ activeTTSSegmentKey === "dpo-grievance-link" ? styles3.ttsHighlight : null
2811
2940
  ],
2812
- onPress: () => import_react_native5.Linking.openURL(dpo.grievance_url),
2941
+ onPress: () => import_react_native6.Linking.openURL(dpo.grievance_url),
2813
2942
  children: getT("grievance_anchor_text", dpo.grievance_anchor_text)
2814
2943
  }
2815
2944
  ),
2816
- dpo.grievance_email ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2945
+ dpo.grievance_email ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2817
2946
  " ",
2818
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: activeTTSSegmentKey === "dpo-grievance-email-connector" ? styles2.ttsHighlight : null, children: getT("grievance_email_connector_text", dpo.grievance_email_connector_text || "or email to") }),
2947
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-grievance-email-connector" ? styles3.ttsHighlight : null, children: getT("grievance_email_connector_text", dpo.grievance_email_connector_text || "or email to") }),
2819
2948
  " ",
2820
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2821
- import_react_native5.Text,
2949
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2950
+ import_react_native6.Text,
2822
2951
  {
2823
2952
  style: [
2824
- styles2.link,
2953
+ styles3.link,
2825
2954
  { color: linkColor },
2826
- activeTTSSegmentKey === "dpo-grievance-email" ? styles2.ttsHighlight : null
2955
+ activeTTSSegmentKey === "dpo-grievance-email" ? styles3.ttsHighlight : null
2827
2956
  ],
2828
- onPress: () => import_react_native5.Linking.openURL(`mailto:${dpo.grievance_email}`),
2957
+ onPress: () => import_react_native6.Linking.openURL(`mailto:${dpo.grievance_email}`),
2829
2958
  children: dpo.grievance_email
2830
2959
  }
2831
2960
  )
2832
2961
  ] }) : null,
2833
2962
  "\n"
2834
2963
  ] }) : null,
2835
- (dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2836
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: activeTTSSegmentKey === "dpo-dp-board-text" ? styles2.ttsHighlight : null, children: [
2964
+ (dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2965
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-dp-board-text" ? styles3.ttsHighlight : null, children: [
2837
2966
  getT("dp_board_text", dpo.dp_board_text),
2838
2967
  " "
2839
2968
  ] }),
2840
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2841
- import_react_native5.Text,
2969
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2970
+ import_react_native6.Text,
2842
2971
  {
2843
2972
  style: [
2844
- styles2.link,
2973
+ styles3.link,
2845
2974
  { color: linkColor },
2846
- activeTTSSegmentKey === "dpo-dp-board-link" ? styles2.ttsHighlight : null
2975
+ activeTTSSegmentKey === "dpo-dp-board-link" ? styles3.ttsHighlight : null
2847
2976
  ],
2848
- onPress: () => import_react_native5.Linking.openURL(dpo.dp_board_url),
2977
+ onPress: () => import_react_native6.Linking.openURL(dpo.dp_board_url),
2849
2978
  children: getT("dp_board_anchor_text", dpo.dp_board_anchor_text)
2850
2979
  }
2851
2980
  ),
2852
2981
  "\n"
2853
2982
  ] }) : null,
2854
- (dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2855
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.Text, { style: activeTTSSegmentKey === "dpo-dpo-text" ? styles2.ttsHighlight : null, children: [
2983
+ (dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2984
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-dpo-text" ? styles3.ttsHighlight : null, children: [
2856
2985
  getT("dpo_text", dpo.dpo_text),
2857
2986
  " "
2858
2987
  ] }),
2859
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2860
- import_react_native5.Text,
2988
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2989
+ import_react_native6.Text,
2861
2990
  {
2862
2991
  style: [
2863
- styles2.link,
2992
+ styles3.link,
2864
2993
  { color: linkColor },
2865
- activeTTSSegmentKey === "dpo-dpo-link" ? styles2.ttsHighlight : null
2994
+ activeTTSSegmentKey === "dpo-dpo-link" ? styles3.ttsHighlight : null
2866
2995
  ],
2867
- onPress: () => import_react_native5.Linking.openURL(dpo.dpo_url),
2996
+ onPress: () => import_react_native6.Linking.openURL(dpo.dpo_url),
2868
2997
  children: getT("dpo_anchor_text", dpo.dpo_anchor_text)
2869
2998
  }
2870
2999
  )
@@ -2872,62 +3001,114 @@ var RedactoNoticeConsent = ({
2872
3001
  ] }) });
2873
3002
  })() : null
2874
3003
  ] }),
2875
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.bottomSection, children: isReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2876
- import_react_native5.TouchableOpacity,
3004
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3005
+ import_react_native6.View,
2877
3006
  {
2878
- style: [styles2.button, styles2.acceptButton, acceptButtonStyle],
2879
- onPress: () => setIsReviewMode(false),
2880
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.buttonText, styles2.acceptButtonText, acceptButtonTextStyle], children: reviewModeButtonText || "Update Consent" })
2881
- }
2882
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2883
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2884
- import_react_native5.TouchableOpacity,
2885
- {
2886
- style: [
2887
- styles2.button,
2888
- styles2.acceptButton,
2889
- acceptButtonStyle,
2890
- isSubmitting || !areAllRequiredElementsChecked ? { opacity: 0.5 } : null
2891
- ],
2892
- onPress: handleAccept,
2893
- disabled: isSubmitting || !areAllRequiredElementsChecked,
2894
- accessibilityLabel: isSubmitting ? "Submitting consent" : getTranslatedText("confirm_button_text", (activeConfig == null ? void 0 : activeConfig.confirm_button_text) || "Accept"),
2895
- children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.ActivityIndicator, { size: "small", color: acceptTextColor }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2896
- import_react_native5.Text,
2897
- {
2898
- style: [
2899
- styles2.buttonText,
2900
- styles2.acceptButtonText,
2901
- acceptButtonTextStyle,
2902
- activeTTSSegmentKey === "confirm_button_text" ? styles2.ttsHighlight : null
2903
- ],
2904
- children: getTranslatedText("confirm_button_text", (activeConfig == null ? void 0 : activeConfig.confirm_button_text) || "Accept")
3007
+ style: isReviewMode ? styles3.bottomSection : isMobile ? styles3.actionButtonStack : styles3.actionButtonRow,
3008
+ children: isReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3009
+ import_react_native6.TouchableOpacity,
3010
+ {
3011
+ style: [styles3.button, styles3.acceptButton, acceptButtonStyle],
3012
+ onPress: () => setIsReviewMode(false),
3013
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.buttonText, styles3.acceptButtonText, acceptButtonTextStyle], children: reviewModeButtonText || "Update Consent" })
3014
+ }
3015
+ ) : (
3016
+ /* Rendered in a different order per breakpoint rather than
3017
+ reordered with styles, so focus order follows visual order. */
3018
+ footerButtonOrder.map((slot) => {
3019
+ if (slot === "acceptAll") {
3020
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3021
+ import_react_native6.TouchableOpacity,
3022
+ {
3023
+ style: [
3024
+ styles3.button,
3025
+ widthStyle,
3026
+ styles3.acceptButton,
3027
+ acceptAllButtonStyle,
3028
+ isSubmitting ? { opacity: 0.5 } : null
3029
+ ],
3030
+ onPress: handleAcceptAll,
3031
+ disabled: isSubmitting,
3032
+ accessibilityLabel: acceptAllLabel,
3033
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3034
+ import_react_native6.Text,
3035
+ {
3036
+ style: [
3037
+ styles3.buttonText,
3038
+ styles3.acceptButtonText,
3039
+ acceptAllButtonTextStyle,
3040
+ activeTTSSegmentKey === "accept_all_button_text" ? styles3.ttsHighlight : null
3041
+ ],
3042
+ children: acceptAllLabel
3043
+ }
3044
+ )
3045
+ },
3046
+ slot
3047
+ );
2905
3048
  }
2906
- )
2907
- }
2908
- ),
2909
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2910
- import_react_native5.TouchableOpacity,
2911
- {
2912
- style: [styles2.button, styles2.cancelButton, declineButtonStyle, isSubmitting ? { opacity: 0.5 } : null],
2913
- onPress: handleDecline,
2914
- disabled: isSubmitting,
2915
- accessibilityLabel: getTranslatedText("decline_button_text", (activeConfig == null ? void 0 : activeConfig.decline_button_text) || "Decline"),
2916
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2917
- import_react_native5.Text,
2918
- {
2919
- style: [
2920
- styles2.buttonText,
2921
- styles2.cancelButtonText,
2922
- declineButtonTextStyle,
2923
- activeTTSSegmentKey === "decline_button_text" ? styles2.ttsHighlight : null
2924
- ],
2925
- children: getTranslatedText("decline_button_text", (activeConfig == null ? void 0 : activeConfig.decline_button_text) || "Decline")
3049
+ if (slot === "acceptSelected") {
3050
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3051
+ import_react_native6.TouchableOpacity,
3052
+ {
3053
+ style: [
3054
+ styles3.button,
3055
+ widthStyle,
3056
+ styles3.acceptSecondaryButton,
3057
+ acceptSelectedButtonStyle,
3058
+ isSubmitting || !areAllRequiredElementsChecked ? { opacity: 0.5 } : null
3059
+ ],
3060
+ onPress: handleAcceptSelected,
3061
+ disabled: isSubmitting || !areAllRequiredElementsChecked,
3062
+ accessibilityLabel: isSubmitting ? "Submitting consent" : acceptSelectedLabel,
3063
+ children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ActivityIndicator, { size: "small", color: accentColor }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3064
+ import_react_native6.Text,
3065
+ {
3066
+ style: [
3067
+ styles3.buttonText,
3068
+ styles3.acceptSecondaryButtonText,
3069
+ acceptSelectedButtonTextStyle,
3070
+ activeTTSSegmentKey === "confirm_button_text" ? styles3.ttsHighlight : null
3071
+ ],
3072
+ children: acceptSelectedLabel
3073
+ }
3074
+ )
3075
+ },
3076
+ slot
3077
+ );
2926
3078
  }
2927
- )
2928
- }
2929
- )
2930
- ] }) })
3079
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3080
+ import_react_native6.TouchableOpacity,
3081
+ {
3082
+ style: [
3083
+ styles3.button,
3084
+ widthStyle,
3085
+ styles3.cancelButton,
3086
+ declineButtonStyle,
3087
+ isMobile ? null : styles3.declineSpacer,
3088
+ isSubmitting ? { opacity: 0.5 } : null
3089
+ ],
3090
+ onPress: handleDecline,
3091
+ disabled: isSubmitting,
3092
+ accessibilityLabel: declineLabel,
3093
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3094
+ import_react_native6.Text,
3095
+ {
3096
+ style: [
3097
+ styles3.buttonText,
3098
+ styles3.cancelButtonText,
3099
+ declineButtonTextStyle,
3100
+ activeTTSSegmentKey === "decline_button_text" ? styles3.ttsHighlight : null
3101
+ ],
3102
+ children: declineLabel
3103
+ }
3104
+ )
3105
+ },
3106
+ slot
3107
+ );
3108
+ })
3109
+ )
3110
+ }
3111
+ )
2931
3112
  ] })
2932
3113
  }
2933
3114
  )
@@ -2938,7 +3119,7 @@ var RedactoNoticeConsent = ({
2938
3119
 
2939
3120
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
2940
3121
  var import_react3 = require("react");
2941
- var import_react_native7 = require("react-native");
3122
+ var import_react_native8 = require("react-native");
2942
3123
  var import_react_native_svg4 = __toESM(require("react-native-svg"));
2943
3124
 
2944
3125
  // src/RedactoNoticeConsentInline/api/index.ts
@@ -3104,15 +3285,15 @@ var fetchNoticeConsentStatusForScope = async ({
3104
3285
  var isNoticeFullyConsented = (status) => status.consented && status.all_mandatory_active;
3105
3286
 
3106
3287
  // src/RedactoNoticeConsentInline/styles.ts
3107
- var import_react_native6 = require("react-native");
3108
- var styles3 = import_react_native6.StyleSheet.create({
3288
+ var import_react_native7 = require("react-native");
3289
+ var styles4 = import_react_native7.StyleSheet.create({
3109
3290
  container: {
3110
3291
  width: "100%",
3111
3292
  borderRadius: 8,
3112
3293
  backgroundColor: "#ffffff",
3113
3294
  borderWidth: 1,
3114
3295
  borderColor: "#e5e7eb",
3115
- ...import_react_native6.Platform.select({
3296
+ ...import_react_native7.Platform.select({
3116
3297
  ios: {
3117
3298
  shadowColor: "#000",
3118
3299
  shadowOffset: { width: 0, height: 1 },
@@ -3305,9 +3486,6 @@ var styles3 = import_react_native6.StyleSheet.create({
3305
3486
  color: "#DC2626",
3306
3487
  fontSize: 14
3307
3488
  },
3308
- requiredAsterisk: {
3309
- color: "red"
3310
- },
3311
3489
  purposeChevron: {
3312
3490
  marginLeft: 5,
3313
3491
  alignItems: "center",
@@ -3328,7 +3506,7 @@ var styles3 = import_react_native6.StyleSheet.create({
3328
3506
  minWidth: 120,
3329
3507
  maxHeight: 200,
3330
3508
  marginTop: 4,
3331
- ...import_react_native6.Platform.select({
3509
+ ...import_react_native7.Platform.select({
3332
3510
  ios: {
3333
3511
  shadowColor: "#000",
3334
3512
  shadowOffset: { width: 0, height: 2 },
@@ -3359,7 +3537,7 @@ var styles3 = import_react_native6.StyleSheet.create({
3359
3537
  });
3360
3538
 
3361
3539
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
3362
- var import_jsx_runtime4 = require("react/jsx-runtime");
3540
+ var import_jsx_runtime5 = require("react/jsx-runtime");
3363
3541
  var RedactoConsentInlineComponent = ({
3364
3542
  org_uuid,
3365
3543
  workspace_uuid,
@@ -3670,28 +3848,28 @@ var RedactoConsentInlineComponent = ({
3670
3848
  );
3671
3849
  if (hasAlreadyConsented || fetchError) return null;
3672
3850
  if (isLoading) {
3673
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.loadingContainer, children: [
3674
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.ActivityIndicator, { size: "large", color: "#4f87ff" }),
3675
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: [styles3.loadingText, { color: textColor }], children: "Loading..." })
3851
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.loadingContainer, children: [
3852
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.ActivityIndicator, { size: "large", color: "#4f87ff" }),
3853
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.loadingText, { color: textColor }], children: "Loading..." })
3676
3854
  ] });
3677
3855
  }
3678
3856
  if (!content) return null;
3679
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: { gap: 16 }, children: [
3680
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.View, { style: styles3.errorContainer, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: styles3.errorText, children: errorMessage }) }) : null,
3681
- supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: [styles3.topSection, { borderBottomWidth: 0, paddingBottom: 0 }], children: [
3682
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.View, {}),
3683
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.languageSelectorContainer, children: [
3684
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3685
- import_react_native7.TouchableOpacity,
3857
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: { gap: 16 }, children: [
3858
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.errorContainer, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: styles4.errorText, children: errorMessage }) }) : null,
3859
+ supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: [styles4.topSection, { borderBottomWidth: 0, paddingBottom: 0 }], children: [
3860
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, {}),
3861
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.languageSelectorContainer, children: [
3862
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3863
+ import_react_native8.TouchableOpacity,
3686
3864
  {
3687
3865
  style: [
3688
- styles3.topRight,
3866
+ styles4.topRight,
3689
3867
  ((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
3690
3868
  ],
3691
3869
  onPress: () => setIsLanguageDropdownOpen((v) => !v),
3692
3870
  children: [
3693
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: [styles3.topRightText, ((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
3694
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg4.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3871
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.topRightText, ((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
3872
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native_svg4.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3695
3873
  import_react_native_svg4.Path,
3696
3874
  {
3697
3875
  d: "M4 6L8 10L12 6",
@@ -3704,34 +3882,34 @@ var RedactoConsentInlineComponent = ({
3704
3882
  ]
3705
3883
  }
3706
3884
  ),
3707
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.View, { style: styles3.languageDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3708
- import_react_native7.TouchableOpacity,
3885
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.languageDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3886
+ import_react_native8.TouchableOpacity,
3709
3887
  {
3710
3888
  style: [
3711
- styles3.languageItem,
3712
- lang === selectedLanguage ? styles3.selectedLanguageItem : null
3889
+ styles4.languageItem,
3890
+ lang === selectedLanguage ? styles4.selectedLanguageItem : null
3713
3891
  ],
3714
3892
  onPress: () => {
3715
3893
  setSelectedLanguage(lang);
3716
3894
  setIsLanguageDropdownOpen(false);
3717
3895
  },
3718
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: [styles3.languageItemText, lang === selectedLanguage ? styles3.selectedLanguageItemText : null], children: lang })
3896
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.languageItemText, lang === selectedLanguage ? styles4.selectedLanguageItemText : null], children: lang })
3719
3897
  },
3720
3898
  lang
3721
3899
  )) }) })
3722
3900
  ] })
3723
3901
  ] }),
3724
- content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { children: [
3725
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.optionItem, children: [
3726
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3727
- import_react_native7.TouchableOpacity,
3902
+ content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { children: [
3903
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.optionItem, children: [
3904
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3905
+ import_react_native8.TouchableOpacity,
3728
3906
  {
3729
- style: styles3.optionLeft,
3907
+ style: styles4.optionLeft,
3730
3908
  onPress: () => togglePurposeCollapse(purpose.uuid),
3731
3909
  accessibilityRole: "button",
3732
3910
  accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`,
3733
3911
  children: [
3734
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.View, { style: styles3.purposeChevron, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg4.default, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3912
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.purposeChevron, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native_svg4.default, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3735
3913
  import_react_native_svg4.Path,
3736
3914
  {
3737
3915
  d: "M1 1L6 6L1 11",
@@ -3742,14 +3920,17 @@ var RedactoConsentInlineComponent = ({
3742
3920
  transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
3743
3921
  }
3744
3922
  ) }) }),
3745
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.optionTextContainer, children: [
3746
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: [styles3.optionTitle, { color: headingColor }, isMobile ? { fontSize: 14 } : null], children: getTranslatedText("purposes.name", purpose.name, purpose.uuid) }),
3747
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: [styles3.optionDescription, { color: textColor }, isMobile ? { fontSize: 11 } : null], children: getTranslatedText("purposes.description", purpose.description, purpose.uuid) })
3923
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.optionTextContainer, children: [
3924
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.Text, { style: [styles4.optionTitle, { color: headingColor }, isMobile ? { fontSize: 14 } : null], children: [
3925
+ getTranslatedText("purposes.name", purpose.name, purpose.uuid),
3926
+ hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
3927
+ ] }),
3928
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.optionDescription, { color: textColor }, isMobile ? { fontSize: 11 } : null], children: getTranslatedText("purposes.description", purpose.description, purpose.uuid) })
3748
3929
  ] })
3749
3930
  ]
3750
3931
  }
3751
3932
  ),
3752
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3933
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3753
3934
  Checkbox,
3754
3935
  {
3755
3936
  checked: selectedPurposes[purpose.uuid] || false,
@@ -3760,12 +3941,12 @@ var RedactoConsentInlineComponent = ({
3760
3941
  }
3761
3942
  )
3762
3943
  ] }),
3763
- !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.View, { style: styles3.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.dataElementItem, children: [
3764
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.Text, { style: [styles3.dataElementText, { color: textColor }, isMobile ? { fontSize: 12 } : null], children: [
3944
+ !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.dataElementItem, children: [
3945
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.Text, { style: [styles4.dataElementText, { color: textColor }, isMobile ? { fontSize: 12 } : null], children: [
3765
3946
  getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
3766
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.Text, { style: styles3.requiredAsterisk, children: " *" })
3947
+ dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
3767
3948
  ] }),
3768
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3949
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3769
3950
  Checkbox,
3770
3951
  {
3771
3952
  checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,