@redacto.io/consent-sdk-react-native 5.0.0-beta.9 → 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 = [
@@ -526,122 +528,6 @@ var verifyGuardianStatus = async ({
526
528
  };
527
529
  };
528
530
 
529
- // src/shared/notice-consent-status.ts
530
- var import_jwt_decode2 = require("jwt-decode");
531
- var decodeNoticeConsentToken = (token) => {
532
- try {
533
- return (0, import_jwt_decode2.jwtDecode)(token);
534
- } catch {
535
- return null;
536
- }
537
- };
538
- var fetchNoticeConsentStatusForScope = async ({
539
- accessToken,
540
- ledgerBaseUrl,
541
- organisationUuid,
542
- workspaceUuid,
543
- noticeUuid,
544
- signal
545
- }) => {
546
- if (!accessToken || !ledgerBaseUrl || !organisationUuid || !workspaceUuid || !noticeUuid) {
547
- return null;
548
- }
549
- try {
550
- const response = await fetch(
551
- `${ledgerBaseUrl}/public/organisations/${organisationUuid}/workspaces/${workspaceUuid}/notices/${noticeUuid}/check-consent`,
552
- {
553
- method: "POST",
554
- headers: {
555
- Authorization: `Bearer ${accessToken}`,
556
- "Content-Type": "application/json"
557
- },
558
- body: "{}",
559
- signal
560
- }
561
- );
562
- if (!response.ok) {
563
- return null;
564
- }
565
- const data = await response.json();
566
- const body = data && typeof data === "object" && "detail" in data && data.detail ? data.detail : data;
567
- if (!body || !Array.isArray(body.purposes)) {
568
- return null;
569
- }
570
- return body;
571
- } catch {
572
- return null;
573
- }
574
- };
575
- var fetchNoticeConsentStatus = async ({
576
- accessToken,
577
- ledgerBaseUrl,
578
- noticeUuid,
579
- signal
580
- }) => {
581
- if (!accessToken || !ledgerBaseUrl || !noticeUuid) {
582
- return null;
583
- }
584
- const decodedToken = decodeNoticeConsentToken(accessToken);
585
- if (!decodedToken) {
586
- return null;
587
- }
588
- const {
589
- organisation_uuid: ORGANISATION_UUID,
590
- workspace_uuid: WORKSPACE_UUID
591
- } = decodedToken;
592
- if (!ORGANISATION_UUID || !WORKSPACE_UUID) {
593
- return null;
594
- }
595
- return fetchNoticeConsentStatusForScope({
596
- accessToken,
597
- ledgerBaseUrl,
598
- organisationUuid: ORGANISATION_UUID,
599
- workspaceUuid: WORKSPACE_UUID,
600
- noticeUuid,
601
- signal
602
- });
603
- };
604
- var isNoticeFullyConsented = (status) => status.consented && status.all_mandatory_active;
605
- var buildLedgerConsentOverlay = (status, configPurposes) => {
606
- var _a, _b;
607
- const byUuid = new Map(status.purposes.map((p) => [p.uuid, p]));
608
- const hasHistory = status.purposes.some(
609
- (p) => (p.status || "INACTIVE") !== "INACTIVE"
610
- );
611
- if (!hasHistory) {
612
- return null;
613
- }
614
- const purpose_selections = {};
615
- for (const cp of configPurposes) {
616
- const lp = byUuid.get(cp.uuid);
617
- const purposeStatus = (lp == null ? void 0 : lp.status) || "INACTIVE";
618
- const selectedByUuid = new Map(
619
- ((lp == null ? void 0 : lp.data_elements) || []).map((de) => [de.uuid, de.selected])
620
- );
621
- const data_elements = {};
622
- for (const de of cp.data_elements) {
623
- data_elements[de.uuid] = {
624
- selected: (_a = selectedByUuid.get(de.uuid)) != null ? _a : false,
625
- enabled: de.enabled,
626
- required: de.required
627
- };
628
- }
629
- purpose_selections[cp.uuid] = {
630
- selected: (_b = lp == null ? void 0 : lp.selected) != null ? _b : false,
631
- status: purposeStatus,
632
- needs_reconsent: purposeStatus !== "ACTIVE",
633
- data_elements
634
- };
635
- }
636
- const reconsent_required = configPurposes.some(
637
- (cp) => {
638
- var _a2;
639
- return (((_a2 = purpose_selections[cp.uuid]) == null ? void 0 : _a2.status) || "INACTIVE") !== "ACTIVE";
640
- }
641
- );
642
- return { reconsent_required, purpose_selections };
643
- };
644
-
645
531
  // src/RedactoNoticeConsent/components/Checkbox.tsx
646
532
  var import_react_native = require("react-native");
647
533
  var import_react_native_svg = __toESM(require("react-native-svg"));
@@ -715,11 +601,21 @@ var styles = import_react_native.StyleSheet.create({
715
601
  }
716
602
  });
717
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
+
718
614
  // src/RedactoNoticeConsent/components/VerificationScreen.tsx
719
615
  var import_react = require("react");
720
- var import_react_native2 = require("react-native");
616
+ var import_react_native3 = require("react-native");
721
617
  var import_react_native_svg2 = __toESM(require("react-native-svg"));
722
- var import_jsx_runtime2 = require("react/jsx-runtime");
618
+ var import_jsx_runtime3 = require("react/jsx-runtime");
723
619
  var VerificationScreen = ({
724
620
  status,
725
621
  errorMessage,
@@ -739,32 +635,32 @@ var VerificationScreen = ({
739
635
  const declineBg = ((_f = (_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) == null ? void 0 : _f.backgroundColor) || "#ffffff";
740
636
  const declineText = ((_h = (_g = settings == null ? void 0 : settings.button) == null ? void 0 : _g.decline) == null ? void 0 : _h.textColor) || "#000000";
741
637
  const borderColor = (settings == null ? void 0 : settings.borderColor) || "#d0d5dd";
742
- const scaleAnim = (0, import_react.useRef)(new import_react_native2.Animated.Value(0.3)).current;
743
- const contentAnim = (0, import_react.useRef)(new import_react_native2.Animated.Value(0)).current;
744
- 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;
745
641
  (0, import_react.useEffect)(() => {
746
- import_react_native2.Animated.spring(scaleAnim, {
642
+ import_react_native3.Animated.spring(scaleAnim, {
747
643
  toValue: 1,
748
644
  friction: 5,
749
645
  tension: 40,
750
646
  delay: 100,
751
647
  useNativeDriver: true
752
648
  }).start();
753
- import_react_native2.Animated.timing(contentAnim, {
649
+ import_react_native3.Animated.timing(contentAnim, {
754
650
  toValue: 1,
755
651
  duration: 400,
756
652
  delay: 250,
757
653
  useNativeDriver: true
758
654
  }).start();
759
655
  if (status === "verified") {
760
- import_react_native2.Animated.loop(
761
- import_react_native2.Animated.sequence([
762
- 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, {
763
659
  toValue: 0,
764
660
  duration: 1200,
765
661
  useNativeDriver: true
766
662
  }),
767
- import_react_native2.Animated.timing(pulseAnim, {
663
+ import_react_native3.Animated.timing(pulseAnim, {
768
664
  toValue: 0.6,
769
665
  duration: 0,
770
666
  useNativeDriver: true
@@ -787,20 +683,20 @@ var VerificationScreen = ({
787
683
  return errorMessage || "An error occurred during verification. Please try again.";
788
684
  }
789
685
  };
790
- const renderPendingContent = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.centerContent, children: [
791
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.ActivityIndicator, { size: "large", color: acceptBg, style: s.pendingSpinner }),
792
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.infoBanner, children: [
793
- /* @__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: [
794
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native_svg2.Circle, { cx: "12", cy: "12", r: "10", stroke: "#059669", strokeWidth: 2 }),
795
- /* @__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" })
796
692
  ] }),
797
- /* @__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." })
798
694
  ] })
799
695
  ] });
800
- const renderSuccessContent = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.centerContent, children: [
801
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.iconWrapper, children: [
802
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
803
- 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,
804
700
  {
805
701
  style: [
806
702
  s.pulseRing,
@@ -816,7 +712,7 @@ var VerificationScreen = ({
816
712
  ]
817
713
  }
818
714
  ),
819
- /* @__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)(
820
716
  import_react_native_svg2.Path,
821
717
  {
822
718
  d: "M5 13L9 17L19 7",
@@ -827,8 +723,8 @@ var VerificationScreen = ({
827
723
  }
828
724
  ) }) })
829
725
  ] }),
830
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
831
- import_react_native2.Animated.Text,
726
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
727
+ import_react_native3.Animated.Text,
832
728
  {
833
729
  style: [
834
730
  s.statusTitle,
@@ -837,8 +733,8 @@ var VerificationScreen = ({
837
733
  children: "Verification Completed"
838
734
  }
839
735
  ),
840
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
841
- import_react_native2.Animated.Text,
736
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
737
+ import_react_native3.Animated.Text,
842
738
  {
843
739
  style: [
844
740
  s.statusSubtext,
@@ -848,8 +744,8 @@ var VerificationScreen = ({
848
744
  }
849
745
  )
850
746
  ] });
851
- const renderErrorContent = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.centerContent, children: [
852
- /* @__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)(
853
749
  import_react_native_svg2.Path,
854
750
  {
855
751
  d: "M18 6L6 18M6 6L18 18",
@@ -859,8 +755,8 @@ var VerificationScreen = ({
859
755
  strokeLinejoin: "round"
860
756
  }
861
757
  ) }) }) }),
862
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
863
- import_react_native2.Animated.Text,
758
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
759
+ import_react_native3.Animated.Text,
864
760
  {
865
761
  style: [
866
762
  s.statusTitle,
@@ -872,8 +768,8 @@ var VerificationScreen = ({
872
768
  ]
873
769
  }
874
770
  ),
875
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.Animated.View, { style: [s.errorBanner, { opacity: contentAnim }], children: [
876
- /* @__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)(
877
773
  import_react_native_svg2.Path,
878
774
  {
879
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",
@@ -883,69 +779,69 @@ var VerificationScreen = ({
883
779
  strokeLinejoin: "round"
884
780
  }
885
781
  ) }),
886
- /* @__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() })
887
783
  ] })
888
784
  ] });
889
785
  const renderBottomButtons = () => {
890
786
  if (status === "verified") {
891
787
  if (!onContinue) return null;
892
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
893
- 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,
894
790
  {
895
791
  style: [s.primaryButton, { backgroundColor: acceptBg }],
896
792
  onPress: onContinue,
897
793
  activeOpacity: 0.8,
898
- 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" })
899
795
  }
900
796
  ) });
901
797
  }
902
798
  if (status === "failed" || status === "expired") {
903
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: [
904
- errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
905
- 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,
906
802
  {
907
803
  style: [s.primaryButton, { backgroundColor: acceptBg }],
908
804
  onPress: onChangeGuardian,
909
805
  activeOpacity: 0.8,
910
- 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" })
911
807
  }
912
- ) : canRetry !== false ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
913
- import_react_native2.TouchableOpacity,
808
+ ) : canRetry !== false ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
809
+ import_react_native3.TouchableOpacity,
914
810
  {
915
811
  style: [s.primaryButton, { backgroundColor: acceptBg }],
916
812
  onPress: onRetry,
917
813
  activeOpacity: 0.8,
918
- 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" })
919
815
  }
920
816
  ) : null,
921
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
922
- import_react_native2.TouchableOpacity,
817
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
818
+ import_react_native3.TouchableOpacity,
923
819
  {
924
820
  style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
925
821
  onPress: onBack,
926
822
  activeOpacity: 0.8,
927
- 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" })
928
824
  }
929
825
  )
930
826
  ] });
931
827
  }
932
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
933
- 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,
934
830
  {
935
831
  style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
936
832
  onPress: onBack,
937
833
  activeOpacity: 0.8,
938
- 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" })
939
835
  }
940
836
  ) });
941
837
  };
942
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: s.root, children: [
943
- /* @__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" }) }),
944
- /* @__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() }),
945
841
  renderBottomButtons()
946
842
  ] });
947
843
  };
948
- var s = import_react_native2.StyleSheet.create({
844
+ var s = import_react_native3.StyleSheet.create({
949
845
  root: {
950
846
  flex: 1
951
847
  },
@@ -955,7 +851,7 @@ var s = import_react_native2.StyleSheet.create({
955
851
  alignItems: "center",
956
852
  paddingHorizontal: 20,
957
853
  paddingVertical: 16,
958
- borderBottomWidth: import_react_native2.StyleSheet.hairlineWidth,
854
+ borderBottomWidth: import_react_native3.StyleSheet.hairlineWidth,
959
855
  borderBottomColor: "#E5E7EB"
960
856
  },
961
857
  topTitle: {
@@ -1063,7 +959,7 @@ var s = import_react_native2.StyleSheet.create({
1063
959
  bottomSection: {
1064
960
  padding: 20,
1065
961
  gap: 8,
1066
- borderTopWidth: import_react_native2.StyleSheet.hairlineWidth,
962
+ borderTopWidth: import_react_native3.StyleSheet.hairlineWidth,
1067
963
  borderTopColor: "#E5E7EB"
1068
964
  },
1069
965
  primaryButton: {
@@ -1098,10 +994,13 @@ var DPO_AUDIO_ELEMENT_MAP = [
1098
994
  { audioKey: "dpo_text_audio_url", elementId: "dpo-dpo-text" },
1099
995
  { audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
1100
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";
1101
1000
 
1102
1001
  // src/RedactoNoticeConsent/styles.ts
1103
- var import_react_native3 = require("react-native");
1104
- var styles2 = import_react_native3.StyleSheet.create({
1002
+ var import_react_native4 = require("react-native");
1003
+ var styles3 = import_react_native4.StyleSheet.create({
1105
1004
  overlay: {
1106
1005
  flex: 1,
1107
1006
  backgroundColor: "rgba(0, 0, 0, 0.5)",
@@ -1115,7 +1014,7 @@ var styles2 = import_react_native3.StyleSheet.create({
1115
1014
  height: "90%",
1116
1015
  borderRadius: 8,
1117
1016
  backgroundColor: "#ffffff",
1118
- ...import_react_native3.Platform.select({
1017
+ ...import_react_native4.Platform.select({
1119
1018
  ios: {
1120
1019
  shadowColor: "#000",
1121
1020
  shadowOffset: { width: 0, height: 2 },
@@ -1263,6 +1162,29 @@ var styles2 = import_react_native3.StyleSheet.create({
1263
1162
  backgroundColor: "#ffffff",
1264
1163
  flexShrink: 0
1265
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
+ },
1266
1188
  button: {
1267
1189
  borderRadius: 8,
1268
1190
  paddingVertical: 9,
@@ -1270,6 +1192,24 @@ var styles2 = import_react_native3.StyleSheet.create({
1270
1192
  alignItems: "center",
1271
1193
  justifyContent: "center"
1272
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
+ },
1273
1213
  buttonText: {
1274
1214
  fontWeight: "400",
1275
1215
  fontSize: 16,
@@ -1282,6 +1222,19 @@ var styles2 = import_react_native3.StyleSheet.create({
1282
1222
  acceptButtonText: {
1283
1223
  color: "#ffffff"
1284
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
+ },
1285
1238
  cancelButton: {
1286
1239
  borderWidth: 1,
1287
1240
  borderColor: "#d0d5dd",
@@ -1305,7 +1258,7 @@ var styles2 = import_react_native3.StyleSheet.create({
1305
1258
  minWidth: 120,
1306
1259
  maxHeight: 200,
1307
1260
  marginTop: 4,
1308
- ...import_react_native3.Platform.select({
1261
+ ...import_react_native4.Platform.select({
1309
1262
  ios: {
1310
1263
  shadowColor: "#000",
1311
1264
  shadowOffset: { width: 0, height: 2 },
@@ -1361,9 +1314,6 @@ var styles2 = import_react_native3.StyleSheet.create({
1361
1314
  fontSize: 14,
1362
1315
  flex: 1
1363
1316
  },
1364
- requiredAsterisk: {
1365
- color: "red"
1366
- },
1367
1317
  divider: {
1368
1318
  height: 1,
1369
1319
  backgroundColor: "#e5e7eb",
@@ -1428,10 +1378,28 @@ var styles2 = import_react_native3.StyleSheet.create({
1428
1378
  }
1429
1379
  });
1430
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
+
1431
1399
  // src/RedactoNoticeConsent/useResponsive.ts
1432
- var import_react_native4 = require("react-native");
1400
+ var import_react_native5 = require("react-native");
1433
1401
  var useResponsive = () => {
1434
- const { width, height } = (0, import_react_native4.useWindowDimensions)();
1402
+ const { width, height } = (0, import_react_native5.useWindowDimensions)();
1435
1403
  return {
1436
1404
  isMobile: width < 768,
1437
1405
  width,
@@ -1440,13 +1408,13 @@ var useResponsive = () => {
1440
1408
  };
1441
1409
 
1442
1410
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
1443
- var import_jsx_runtime3 = require("react/jsx-runtime");
1411
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1444
1412
  function RemoteLogo({ uri }) {
1445
1413
  const isSvg = uri.toLowerCase().endsWith(".svg") || uri.toLowerCase().includes("image/svg");
1446
1414
  if (isSvg && import_react_native_svg3.SvgUri) {
1447
- 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 });
1448
1416
  }
1449
- 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 } });
1450
1418
  }
1451
1419
  function stripHtml(html) {
1452
1420
  return html.replace(/<[^>]*>/g, "").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ").trim();
@@ -1498,17 +1466,17 @@ var PurposeItem = ({
1498
1466
  }) => {
1499
1467
  const headingColor = (settings == null ? void 0 : settings.headingColor) || "#323B4B";
1500
1468
  const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
1501
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { children: [
1502
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.optionItem, children: [
1503
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1504
- 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,
1505
1473
  {
1506
- style: styles2.optionLeft,
1474
+ style: styles3.optionLeft,
1507
1475
  onPress: () => onPurposeCollapse(purpose.uuid),
1508
1476
  accessibilityRole: "button",
1509
1477
  accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)} details`,
1510
1478
  children: [
1511
- /* @__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)(
1512
1480
  import_react_native_svg3.Path,
1513
1481
  {
1514
1482
  d: "M1 1L6 6L1 11",
@@ -1519,25 +1487,28 @@ var PurposeItem = ({
1519
1487
  transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
1520
1488
  }
1521
1489
  ) }) }),
1522
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.optionTextContainer, children: [
1523
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1524
- 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,
1525
1493
  {
1526
1494
  style: [
1527
- styles2.optionTitle,
1495
+ styles3.optionTitle,
1528
1496
  { color: headingColor },
1529
- activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles2.ttsHighlight : null
1497
+ activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles3.ttsHighlight : null
1530
1498
  ],
1531
- 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
+ ]
1532
1503
  }
1533
1504
  ),
1534
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1535
- import_react_native5.Text,
1505
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1506
+ import_react_native6.Text,
1536
1507
  {
1537
1508
  style: [
1538
- styles2.optionDescription,
1509
+ styles3.optionDescription,
1539
1510
  { color: textColor },
1540
- activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles2.ttsHighlight : null
1511
+ activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles3.ttsHighlight : null
1541
1512
  ],
1542
1513
  children: getTranslatedText("purposes.description", purpose.description, purpose.uuid)
1543
1514
  }
@@ -1546,7 +1517,7 @@ var PurposeItem = ({
1546
1517
  ]
1547
1518
  }
1548
1519
  ),
1549
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1520
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1550
1521
  Checkbox,
1551
1522
  {
1552
1523
  checked: selectedPurposes[purpose.uuid] || false,
@@ -1556,7 +1527,7 @@ var PurposeItem = ({
1556
1527
  accessibilityLabel: `Select all data elements for ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`
1557
1528
  }
1558
1529
  ),
1559
- 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)(
1560
1531
  import_react_native_svg3.Path,
1561
1532
  {
1562
1533
  d: "M4 6L5.5 7.5L8.5 4.5",
@@ -1567,22 +1538,22 @@ var PurposeItem = ({
1567
1538
  }
1568
1539
  ) }) })
1569
1540
  ] }),
1570
- !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: [
1571
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1572
- 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,
1573
1544
  {
1574
1545
  style: [
1575
- styles2.dataElementText,
1546
+ styles3.dataElementText,
1576
1547
  { color: textColor },
1577
- activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles2.ttsHighlight : null
1548
+ activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles3.ttsHighlight : null
1578
1549
  ],
1579
1550
  children: [
1580
1551
  getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
1581
- 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, {})
1582
1553
  ]
1583
1554
  }
1584
1555
  ),
1585
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1556
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1586
1557
  Checkbox,
1587
1558
  {
1588
1559
  checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
@@ -1594,7 +1565,7 @@ var PurposeItem = ({
1594
1565
  ),
1595
1566
  isAlreadyConsented && (() => {
1596
1567
  const wasSelected = initialDataElementSelections[`${purpose.uuid}-${dataElement.uuid}`] || false;
1597
- 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)(
1598
1569
  import_react_native_svg3.Path,
1599
1570
  {
1600
1571
  d: "M3 5L4.5 6.5L7.5 3.5",
@@ -1603,7 +1574,7 @@ var PurposeItem = ({
1603
1574
  strokeLinecap: "round",
1604
1575
  strokeLinejoin: "round"
1605
1576
  }
1606
- ) }) }) : /* @__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 });
1607
1578
  })()
1608
1579
  ] }, dataElement.uuid)) })
1609
1580
  ] });
@@ -1614,48 +1585,48 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1614
1585
  const borderColor = (settings == null ? void 0 : settings.borderColor) || "#d0d5dd";
1615
1586
  const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
1616
1587
  const [showRelationshipDropdown, setShowRelationshipDropdown] = (0, import_react2.useState)(false);
1617
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1618
- /* @__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: [
1619
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
1620
- /* @__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" })
1621
1592
  ] }) }),
1622
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.divider }),
1623
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.ScrollView, { style: styles2.middleSection, showsVerticalScrollIndicator: false, children: [
1624
- /* @__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." }),
1625
- /* @__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." }) }),
1626
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: { marginTop: 16, gap: 12 }, children: [
1627
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.inputContainer, children: [
1628
- /* @__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: [
1629
1600
  "Guardian's Full Name ",
1630
- /* @__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: "*" })
1631
1602
  ] }),
1632
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1633
- import_react_native5.TextInput,
1603
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1604
+ import_react_native6.TextInput,
1634
1605
  {
1635
1606
  value: formData.guardianName,
1636
1607
  onChangeText: (v) => onChange("guardianName", v),
1637
1608
  style: [
1638
- styles2.textInput,
1609
+ styles3.textInput,
1639
1610
  { borderColor: errors.guardianName ? "#DC2626" : borderColor, color: textColor }
1640
1611
  ],
1641
1612
  placeholder: "e.g. Rajesh Kumar",
1642
1613
  placeholderTextColor: "#9CA3AF"
1643
1614
  }
1644
1615
  ),
1645
- 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
1646
1617
  ] }),
1647
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.inputContainer, children: [
1648
- /* @__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: [
1649
1620
  "Guardian's Phone Number ",
1650
- /* @__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: "*" })
1651
1622
  ] }),
1652
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1653
- import_react_native5.TextInput,
1623
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1624
+ import_react_native6.TextInput,
1654
1625
  {
1655
1626
  value: formData.guardianContact,
1656
1627
  onChangeText: (v) => onChange("guardianContact", v),
1657
1628
  style: [
1658
- styles2.textInput,
1629
+ styles3.textInput,
1659
1630
  { borderColor: errors.guardianContact ? "#DC2626" : borderColor, color: textColor }
1660
1631
  ],
1661
1632
  placeholder: "e.g. 9876543210",
@@ -1663,20 +1634,20 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1663
1634
  keyboardType: "phone-pad"
1664
1635
  }
1665
1636
  ),
1666
- /* @__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" }),
1667
- 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
1668
1639
  ] }),
1669
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.inputContainer, children: [
1670
- /* @__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: [
1671
1642
  "Relationship ",
1672
- /* @__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: "*" })
1673
1644
  ] }),
1674
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: { position: "relative" }, children: [
1675
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1676
- 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,
1677
1648
  {
1678
1649
  style: [
1679
- styles2.textInput,
1650
+ styles3.textInput,
1680
1651
  {
1681
1652
  borderColor: errors.guardianRelationship ? "#DC2626" : borderColor,
1682
1653
  flexDirection: "row",
@@ -1686,8 +1657,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1686
1657
  ],
1687
1658
  onPress: () => setShowRelationshipDropdown((v) => !v),
1688
1659
  children: [
1689
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: { color: formData.guardianRelationship ? textColor : "#9CA3AF", fontSize: 13 }, children: formData.guardianRelationship || "Select relationship" }),
1690
- /* @__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)(
1691
1662
  import_react_native_svg3.Path,
1692
1663
  {
1693
1664
  d: "M4 6L8 10L12 6",
@@ -1700,8 +1671,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1700
1671
  ]
1701
1672
  }
1702
1673
  ),
1703
- 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)(
1704
- 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,
1705
1676
  {
1706
1677
  style: [
1707
1678
  guardianStyles.relationshipItem,
@@ -1711,41 +1682,41 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1711
1682
  onChange("guardianRelationship", option);
1712
1683
  setShowRelationshipDropdown(false);
1713
1684
  },
1714
- 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 })
1715
1686
  },
1716
1687
  option
1717
1688
  )) })
1718
1689
  ] }),
1719
- 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
1720
1691
  ] }),
1721
- 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
1722
1693
  ] })
1723
1694
  ] }),
1724
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.bottomSection, children: [
1725
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1726
- 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,
1727
1698
  {
1728
1699
  style: [
1729
- styles2.button,
1730
- styles2.acceptButton,
1700
+ styles3.button,
1701
+ styles3.acceptButton,
1731
1702
  ((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
1732
1703
  ],
1733
1704
  onPress: onNext,
1734
1705
  disabled: isSubmitting,
1735
1706
  accessibilityLabel: "Submit guardian information and proceed",
1736
- 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: [
1737
- styles2.buttonText,
1738
- 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,
1739
1710
  ((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.accept) ? { color: settings.button.accept.textColor } : null
1740
1711
  ], children: "Verify via DigiLocker" })
1741
1712
  }
1742
1713
  ),
1743
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1744
- import_react_native5.TouchableOpacity,
1714
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1715
+ import_react_native6.TouchableOpacity,
1745
1716
  {
1746
1717
  style: [
1747
- styles2.button,
1748
- styles2.cancelButton,
1718
+ styles3.button,
1719
+ styles3.cancelButton,
1749
1720
  ((_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) ? {
1750
1721
  backgroundColor: settings.button.decline.backgroundColor,
1751
1722
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
@@ -1754,9 +1725,9 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1754
1725
  onPress: onDecline,
1755
1726
  disabled: isSubmitting,
1756
1727
  accessibilityLabel: "Cancel guardian information form",
1757
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1758
- styles2.buttonText,
1759
- styles2.cancelButtonText,
1728
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1729
+ styles3.buttonText,
1730
+ styles3.cancelButtonText,
1760
1731
  ((_f = settings == null ? void 0 : settings.button) == null ? void 0 : _f.decline) ? { color: settings.button.decline.textColor } : null
1761
1732
  ], children: "Cancel" })
1762
1733
  }
@@ -1764,7 +1735,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
1764
1735
  ] })
1765
1736
  ] });
1766
1737
  };
1767
- var guardianStyles = import_react_native5.StyleSheet.create({
1738
+ var guardianStyles = import_react_native6.StyleSheet.create({
1768
1739
  infoBanner: {
1769
1740
  backgroundColor: "#EFF6FF",
1770
1741
  borderWidth: 1,
@@ -1806,43 +1777,43 @@ var guardianStyles = import_react_native5.StyleSheet.create({
1806
1777
  });
1807
1778
  var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
1808
1779
  var _a, _b, _c, _d;
1809
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1810
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topSection, children: [
1811
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topLeft, children: [
1812
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
1813
- /* @__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" })
1814
1785
  ] }),
1815
- 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
1816
1787
  ] }),
1817
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.divider }),
1818
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.ScrollView, { style: styles2.middleSection, showsVerticalScrollIndicator: false, children: [
1819
- /* @__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." }),
1820
- /* @__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?" })
1821
1792
  ] }),
1822
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.bottomSection, children: [
1823
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1824
- 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,
1825
1796
  {
1826
1797
  style: [
1827
- styles2.button,
1828
- styles2.acceptButton,
1798
+ styles3.button,
1799
+ styles3.acceptButton,
1829
1800
  ((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
1830
1801
  ],
1831
1802
  onPress: onYes,
1832
1803
  accessibilityLabel: "Yes, I am 18 or older",
1833
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1834
- styles2.buttonText,
1835
- styles2.acceptButtonText,
1804
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1805
+ styles3.buttonText,
1806
+ styles3.acceptButtonText,
1836
1807
  ((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) ? { color: settings.button.accept.textColor } : null
1837
1808
  ], children: "Yes, I am 18 or older" })
1838
1809
  }
1839
1810
  ),
1840
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1841
- import_react_native5.TouchableOpacity,
1811
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1812
+ import_react_native6.TouchableOpacity,
1842
1813
  {
1843
1814
  style: [
1844
- styles2.button,
1845
- styles2.cancelButton,
1815
+ styles3.button,
1816
+ styles3.cancelButton,
1846
1817
  ((_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.decline) ? {
1847
1818
  backgroundColor: settings.button.decline.backgroundColor,
1848
1819
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
@@ -1850,9 +1821,9 @@ var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
1850
1821
  ],
1851
1822
  onPress: onNo,
1852
1823
  accessibilityLabel: "No, I am under 18",
1853
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [
1854
- styles2.buttonText,
1855
- styles2.cancelButtonText,
1824
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
1825
+ styles3.buttonText,
1826
+ styles3.cancelButtonText,
1856
1827
  ((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.decline) ? { color: settings.button.decline.textColor } : null
1857
1828
  ], children: "No, I am under 18" })
1858
1829
  }
@@ -1883,7 +1854,7 @@ var RedactoNoticeConsent = ({
1883
1854
  includeFullyConsentedData = false,
1884
1855
  reviewModeButtonText
1885
1856
  }) => {
1886
- 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;
1887
1858
  const { isMobile } = useResponsive();
1888
1859
  const sandboxParams = (0, import_react2.useMemo)(
1889
1860
  () => ({
@@ -1941,7 +1912,6 @@ var RedactoNoticeConsent = ({
1941
1912
  const abortControllerRef = (0, import_react2.useRef)(null);
1942
1913
  const hasBootstrappedLanguageRef = (0, import_react2.useRef)(false);
1943
1914
  const fetchContent = (0, import_react2.useCallback)(async () => {
1944
- var _a2, _b2;
1945
1915
  if (abortControllerRef.current) {
1946
1916
  abortControllerRef.current.abort();
1947
1917
  }
@@ -1962,23 +1932,8 @@ var RedactoNoticeConsent = ({
1962
1932
  ...sandboxParams
1963
1933
  });
1964
1934
  const activeConfig2 = data.detail.active_config;
1965
- let purposeSelections = data.detail.purpose_selections;
1966
- let reconsentRequired = data.detail.reconsent_required || false;
1967
- if (accessToken && ledgerBaseUrl && !applicationId && !token) {
1968
- const ledgerStatus = await fetchNoticeConsentStatus({
1969
- accessToken,
1970
- ledgerBaseUrl,
1971
- noticeUuid: noticeId,
1972
- signal: (_a2 = abortControllerRef.current) == null ? void 0 : _a2.signal
1973
- });
1974
- if (ledgerStatus) {
1975
- const overlay = buildLedgerConsentOverlay(ledgerStatus, activeConfig2.purposes);
1976
- reconsentRequired = (_b2 = overlay == null ? void 0 : overlay.reconsent_required) != null ? _b2 : false;
1977
- purposeSelections = overlay == null ? void 0 : overlay.purpose_selections;
1978
- data.detail.purpose_selections = purposeSelections;
1979
- data.detail.reconsent_required = reconsentRequired;
1980
- }
1981
- }
1935
+ const purposeSelections = data.detail.purpose_selections;
1936
+ const reconsentRequired = data.detail.reconsent_required || false;
1982
1937
  const noticeIsMinor = data.detail.is_minor || false;
1983
1938
  setIsMinor(noticeIsMinor);
1984
1939
  const initialCollapsed = {};
@@ -1991,9 +1946,9 @@ var RedactoNoticeConsent = ({
1991
1946
  const purposeSelected = sel ? sel.selected : false;
1992
1947
  initialPurposeState[purpose.uuid] = purposeSelected;
1993
1948
  purpose.data_elements.forEach((el) => {
1994
- var _a3, _b3, _c2;
1949
+ var _a2, _b2, _c2;
1995
1950
  const combinedId = `${purpose.uuid}-${el.uuid}`;
1996
- const elementSel = (_c2 = (_b3 = (_a3 = sel == null ? void 0 : sel.data_elements) == null ? void 0 : _a3[el.uuid]) == null ? void 0 : _b3.selected) != null ? _c2 : false;
1951
+ const elementSel = (_c2 = (_b2 = (_a2 = sel == null ? void 0 : sel.data_elements) == null ? void 0 : _a2[el.uuid]) == null ? void 0 : _b2.selected) != null ? _c2 : false;
1997
1952
  initialDataElementState[combinedId] = elementSel;
1998
1953
  initialDataElementSelectionsMap[combinedId] = elementSel;
1999
1954
  });
@@ -2077,6 +2032,9 @@ var RedactoNoticeConsent = ({
2077
2032
  confirm_button_text: data.detail.confirm_button_text_audio_url,
2078
2033
  decline_button_text: data.detail.decline_button_text_audio_url
2079
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
+ }
2080
2038
  if (data.detail.privacy_center_anchor_text_audio_url) {
2081
2039
  urls.privacy_center_anchor_text = data.detail.privacy_center_anchor_text_audio_url;
2082
2040
  }
@@ -2286,6 +2244,7 @@ var RedactoNoticeConsent = ({
2286
2244
  DPO_AUDIO_ELEMENT_MAP.forEach(({ elementId }) => {
2287
2245
  pushSegment(elementId, ttsAudioUrls[elementId]);
2288
2246
  });
2247
+ pushSegment("accept_all_button_text", ttsAudioUrls.accept_all_button_text);
2289
2248
  pushSegment("confirm_button_text", ttsAudioUrls.confirm_button_text);
2290
2249
  pushSegment("decline_button_text", ttsAudioUrls.decline_button_text);
2291
2250
  if (queue.length === 0) {
@@ -2326,7 +2285,7 @@ var RedactoNoticeConsent = ({
2326
2285
  };
2327
2286
  }, [stopAudio]);
2328
2287
  (0, import_react2.useEffect)(() => {
2329
- const subscription = import_react_native5.AppState.addEventListener("change", (nextAppState) => {
2288
+ const subscription = import_react_native6.AppState.addEventListener("change", (nextAppState) => {
2330
2289
  isAppActiveRef.current = nextAppState === "active";
2331
2290
  });
2332
2291
  return () => subscription.remove();
@@ -2437,12 +2396,20 @@ var RedactoNoticeConsent = ({
2437
2396
  return newState;
2438
2397
  });
2439
2398
  }, [content]);
2440
- const handleAccept = (0, import_react2.useCallback)(async () => {
2399
+ const handleAccept = (0, import_react2.useCallback)(async (mode = "selected") => {
2441
2400
  if (!content) return;
2442
2401
  try {
2443
2402
  setIsSubmitting(true);
2444
2403
  setErrorMessage(null);
2445
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
+ }
2446
2413
  await submitConsentEvent({
2447
2414
  accessToken,
2448
2415
  baseUrl,
@@ -2450,10 +2417,10 @@ var RedactoNoticeConsent = ({
2450
2417
  noticeUuid: activeConfig2.notice_uuid,
2451
2418
  purposes: activeConfig2.purposes.map((purpose) => ({
2452
2419
  ...purpose,
2453
- selected: selectedPurposes[purpose.uuid] || false,
2420
+ selected: selection.selectedPurposes[purpose.uuid] || false,
2454
2421
  data_elements: purpose.data_elements.map((el) => ({
2455
2422
  ...el,
2456
- selected: selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
2423
+ selected: selection.selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
2457
2424
  }))
2458
2425
  })),
2459
2426
  declined: false,
@@ -2518,9 +2485,9 @@ var RedactoNoticeConsent = ({
2518
2485
  setShowVerificationScreen(true);
2519
2486
  pollingCountRef.current = 0;
2520
2487
  try {
2521
- const canOpen = await import_react_native5.Linking.canOpenURL(result.digilockerRedirectUrl);
2488
+ const canOpen = await import_react_native6.Linking.canOpenURL(result.digilockerRedirectUrl);
2522
2489
  if (canOpen) {
2523
- await import_react_native5.Linking.openURL(result.digilockerRedirectUrl);
2490
+ await import_react_native6.Linking.openURL(result.digilockerRedirectUrl);
2524
2491
  }
2525
2492
  } catch {
2526
2493
  }
@@ -2582,41 +2549,71 @@ var RedactoNoticeConsent = ({
2582
2549
  }, [activeConfig, selectedDataElements]);
2583
2550
  const acceptButtonStyle = { backgroundColor: acceptBackgroundColor };
2584
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 };
2585
2563
  const declineButtonStyle = { backgroundColor: declineBackgroundColor, borderColor };
2586
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
+ );
2587
2584
  const modalBg = (settings == null ? void 0 : settings.backgroundColor) ? { backgroundColor: settings.backgroundColor } : {};
2588
2585
  const translatedNoticeText = activeConfig ? stripHtml(getTranslatedText("notice_text", activeConfig.notice_text || "")) : "";
2589
2586
  const translatedAdditionalText = activeConfig ? stripHtml(getTranslatedText("additional_text", activeConfig.additional_text || "")) : "";
2590
2587
  if (!isVisible && !isLoading) return null;
2591
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2592
- import_react_native5.Modal,
2588
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2589
+ import_react_native6.Modal,
2593
2590
  {
2594
2591
  visible: isVisible || isLoading,
2595
2592
  transparent: true,
2596
2593
  animationType: "fade",
2597
2594
  onRequestClose: blockUI ? void 0 : handleDecline,
2598
2595
  accessibilityViewIsModal: true,
2599
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.overlay, children: [
2600
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2601
- 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,
2602
2599
  {
2603
- style: [import_react_native5.StyleSheet.absoluteFillObject, { zIndex: 1 }],
2600
+ style: [import_react_native6.StyleSheet.absoluteFillObject, { zIndex: 1 }],
2604
2601
  onPress: () => setIsLanguageDropdownOpen(false)
2605
2602
  }
2606
2603
  ),
2607
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2608
- import_react_native5.View,
2604
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2605
+ import_react_native6.View,
2609
2606
  {
2610
2607
  style: [
2611
- styles2.modal,
2608
+ styles3.modal,
2612
2609
  modalBg,
2613
2610
  { zIndex: 2 },
2614
2611
  (settings == null ? void 0 : settings.borderRadius) ? { borderRadius: parseInt(settings.borderRadius, 10) } : null
2615
2612
  ],
2616
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.loadingContainer, children: [
2617
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.ActivityIndicator, { size: "large", color: acceptBackgroundColor }),
2618
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.loadingText, children: "Loading..." })
2619
- ] }) : 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)(
2620
2617
  VerificationScreen,
2621
2618
  {
2622
2619
  status: verificationStatus,
@@ -2653,7 +2650,7 @@ var RedactoNoticeConsent = ({
2653
2650
  }
2654
2651
  }
2655
2652
  }
2656
- ) }) : 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)(
2657
2654
  GuardianForm,
2658
2655
  {
2659
2656
  formData: guardianFormData,
@@ -2680,7 +2677,7 @@ var RedactoNoticeConsent = ({
2680
2677
  },
2681
2678
  logoUrl
2682
2679
  }
2683
- ) }) : 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)(
2684
2681
  AgeVerification,
2685
2682
  {
2686
2683
  onYes: () => {
@@ -2708,22 +2705,22 @@ var RedactoNoticeConsent = ({
2708
2705
  },
2709
2706
  logoUrl
2710
2707
  }
2711
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.content, children: [
2712
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.errorContainer, children: [
2713
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: styles2.errorText, children: errorMessage }),
2714
- /* @__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" }) }) })
2715
2712
  ] }) : null,
2716
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topSection, children: [
2717
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.topLeft, children: [
2718
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
2719
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2720
- 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,
2721
2718
  {
2722
2719
  style: [
2723
- styles2.title,
2720
+ styles3.title,
2724
2721
  { color: headingColor },
2725
2722
  isMobile ? { fontSize: 16 } : null,
2726
- activeTTSSegmentKey === "notice_banner_heading" ? styles2.ttsHighlight : null
2723
+ activeTTSSegmentKey === "notice_banner_heading" ? styles3.ttsHighlight : null
2727
2724
  ],
2728
2725
  numberOfLines: 2,
2729
2726
  children: getTranslatedText(
@@ -2733,32 +2730,32 @@ var RedactoNoticeConsent = ({
2733
2730
  }
2734
2731
  )
2735
2732
  ] }),
2736
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: 8, alignItems: "center" }, children: [
2737
- isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2738
- 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,
2739
2736
  {
2740
- 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],
2741
2738
  onPress: toggleAudio,
2742
2739
  accessibilityLabel: isPlaying && !isPaused ? "Pause audio" : isPaused ? "Resume audio" : "Start audio",
2743
- 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: [
2744
- /* @__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" }),
2745
- /* @__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" })
2746
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
2747
- /* @__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)(
2748
2745
  import_react_native_svg3.Path,
2749
2746
  {
2750
2747
  d: "M11 5L6 9H2V15H6L11 19V5Z",
2751
- 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",
2752
2749
  strokeWidth: 2,
2753
2750
  strokeLinecap: "round",
2754
2751
  strokeLinejoin: "round"
2755
2752
  }
2756
2753
  ),
2757
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2754
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2758
2755
  import_react_native_svg3.Path,
2759
2756
  {
2760
2757
  d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",
2761
- 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",
2762
2759
  strokeWidth: 2,
2763
2760
  strokeLinecap: "round",
2764
2761
  strokeLinejoin: "round"
@@ -2767,23 +2764,23 @@ var RedactoNoticeConsent = ({
2767
2764
  ] })
2768
2765
  }
2769
2766
  ),
2770
- supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.View, { style: styles2.languageSelectorContainer, children: [
2771
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2772
- 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,
2773
2770
  {
2774
2771
  style: [
2775
- styles2.topRight,
2776
- ((_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
2777
2774
  ],
2778
2775
  onPress: () => setIsLanguageDropdownOpen((v) => !v),
2779
2776
  accessibilityLabel: `Select language. Current: ${selectedLanguage}`,
2780
2777
  children: [
2781
- /* @__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 }),
2782
- /* @__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)(
2783
2780
  import_react_native_svg3.Path,
2784
2781
  {
2785
2782
  d: "M4 6L8 10L12 6",
2786
- 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",
2787
2784
  strokeWidth: 2,
2788
2785
  strokeLinecap: "round",
2789
2786
  strokeLinejoin: "round"
@@ -2792,23 +2789,23 @@ var RedactoNoticeConsent = ({
2792
2789
  ]
2793
2790
  }
2794
2791
  ),
2795
- 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)(
2796
- 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,
2797
2794
  {
2798
2795
  style: [
2799
- styles2.languageItem,
2800
- lang === selectedLanguage ? styles2.selectedLanguageItem : null
2796
+ styles3.languageItem,
2797
+ lang === selectedLanguage ? styles3.selectedLanguageItem : null
2801
2798
  ],
2802
2799
  onPress: () => {
2803
2800
  setSelectedLanguage(lang);
2804
2801
  setIsLanguageDropdownOpen(false);
2805
2802
  },
2806
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2807
- import_react_native5.Text,
2803
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2804
+ import_react_native6.Text,
2808
2805
  {
2809
2806
  style: [
2810
- styles2.languageItemText,
2811
- lang === selectedLanguage ? styles2.selectedLanguageItemText : null
2807
+ styles3.languageItemText,
2808
+ lang === selectedLanguage ? styles3.selectedLanguageItemText : null
2812
2809
  ],
2813
2810
  children: lang
2814
2811
  }
@@ -2819,63 +2816,63 @@ var RedactoNoticeConsent = ({
2819
2816
  ] })
2820
2817
  ] })
2821
2818
  ] }),
2822
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native5.ScrollView, { style: styles2.middleSection, showsVerticalScrollIndicator: false, children: [
2823
- translatedNoticeText ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2824
- 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,
2825
2822
  {
2826
2823
  style: [
2827
- styles2.privacyText,
2824
+ styles3.privacyText,
2828
2825
  { color: textColor },
2829
- activeTTSSegmentKey === "notice_text" ? styles2.ttsHighlight : null
2826
+ activeTTSSegmentKey === "notice_text" ? styles3.ttsHighlight : null
2830
2827
  ],
2831
2828
  children: translatedNoticeText
2832
2829
  }
2833
2830
  ) : null,
2834
- (activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2835
- import_react_native5.Text,
2831
+ (activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2832
+ import_react_native6.Text,
2836
2833
  {
2837
2834
  style: [
2838
- styles2.privacyText,
2835
+ styles3.privacyText,
2839
2836
  { marginTop: 8 },
2840
2837
  { color: textColor }
2841
2838
  ],
2842
2839
  children: [
2843
- /* @__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: [
2844
2841
  getTranslatedText("privacy_policy_prefix_text", activeConfig.privacy_policy_prefix_text || ""),
2845
2842
  " "
2846
2843
  ] }),
2847
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2848
- import_react_native5.Text,
2844
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2845
+ import_react_native6.Text,
2849
2846
  {
2850
2847
  style: [
2851
- styles2.link,
2848
+ styles3.link,
2852
2849
  { color: linkColor },
2853
- activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles2.ttsHighlight : null
2850
+ activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles3.ttsHighlight : null
2854
2851
  ],
2855
- onPress: () => import_react_native5.Linking.openURL(activeConfig.privacy_policy_url),
2852
+ onPress: () => import_react_native6.Linking.openURL(activeConfig.privacy_policy_url),
2856
2853
  children: getTranslatedText("privacy_policy_anchor_text", activeConfig.privacy_policy_anchor_text || "Privacy Policy")
2857
2854
  }
2858
2855
  )
2859
2856
  ]
2860
2857
  }
2861
2858
  ) : null,
2862
- (activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2863
- 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,
2864
2861
  {
2865
2862
  style: [
2866
- styles2.subTitle,
2863
+ styles3.subTitle,
2867
2864
  { marginTop: 16, marginBottom: 8 },
2868
2865
  { color: headingColor },
2869
- activeTTSSegmentKey === "purpose_section_heading" ? styles2.ttsHighlight : null
2866
+ activeTTSSegmentKey === "purpose_section_heading" ? styles3.ttsHighlight : null
2870
2867
  ],
2871
2868
  children: getTranslatedText("purpose_section_heading", activeConfig.purpose_section_heading || "Data Purposes")
2872
2869
  }
2873
2870
  ) : null,
2874
- /* @__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) => {
2875
2872
  var _a2;
2876
2873
  const purposeSelection = (_a2 = content == null ? void 0 : content.detail.purpose_selections) == null ? void 0 : _a2[purpose.uuid];
2877
2874
  const isAlreadyConsented = !isReconsentMode && ((purposeSelection == null ? void 0 : purposeSelection.selected) || false) && !(purposeSelection == null ? void 0 : purposeSelection.needs_reconsent);
2878
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2875
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2879
2876
  PurposeItem,
2880
2877
  {
2881
2878
  purpose,
@@ -2908,95 +2905,95 @@ var RedactoNoticeConsent = ({
2908
2905
  }
2909
2906
  return fallback;
2910
2907
  };
2911
- 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: [
2912
- 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: [
2913
2910
  translatedAdditionalText,
2914
2911
  " "
2915
2912
  ] }) : null,
2916
- (activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2917
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2918
- 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,
2919
2916
  {
2920
2917
  style: [
2921
- styles2.link,
2918
+ styles3.link,
2922
2919
  { color: linkColor },
2923
- activeTTSSegmentKey === "privacy_center_anchor_text" ? styles2.ttsHighlight : null
2920
+ activeTTSSegmentKey === "privacy_center_anchor_text" ? styles3.ttsHighlight : null
2924
2921
  ],
2925
- onPress: () => import_react_native5.Linking.openURL(activeConfig.privacy_center_url),
2922
+ onPress: () => import_react_native6.Linking.openURL(activeConfig.privacy_center_url),
2926
2923
  children: getTranslatedText("privacy_center_anchor_text", activeConfig.privacy_center_anchor_text || "Privacy Center")
2927
2924
  }
2928
2925
  ),
2929
2926
  ".\n"
2930
2927
  ] }) : null,
2931
- (dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2932
- /* @__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: [
2933
2930
  getT("grievance_text", dpo.grievance_text),
2934
2931
  " "
2935
2932
  ] }),
2936
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2937
- import_react_native5.Text,
2933
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2934
+ import_react_native6.Text,
2938
2935
  {
2939
2936
  style: [
2940
- styles2.link,
2937
+ styles3.link,
2941
2938
  { color: linkColor },
2942
- activeTTSSegmentKey === "dpo-grievance-link" ? styles2.ttsHighlight : null
2939
+ activeTTSSegmentKey === "dpo-grievance-link" ? styles3.ttsHighlight : null
2943
2940
  ],
2944
- onPress: () => import_react_native5.Linking.openURL(dpo.grievance_url),
2941
+ onPress: () => import_react_native6.Linking.openURL(dpo.grievance_url),
2945
2942
  children: getT("grievance_anchor_text", dpo.grievance_anchor_text)
2946
2943
  }
2947
2944
  ),
2948
- 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: [
2949
2946
  " ",
2950
- /* @__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") }),
2951
2948
  " ",
2952
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2953
- import_react_native5.Text,
2949
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2950
+ import_react_native6.Text,
2954
2951
  {
2955
2952
  style: [
2956
- styles2.link,
2953
+ styles3.link,
2957
2954
  { color: linkColor },
2958
- activeTTSSegmentKey === "dpo-grievance-email" ? styles2.ttsHighlight : null
2955
+ activeTTSSegmentKey === "dpo-grievance-email" ? styles3.ttsHighlight : null
2959
2956
  ],
2960
- onPress: () => import_react_native5.Linking.openURL(`mailto:${dpo.grievance_email}`),
2957
+ onPress: () => import_react_native6.Linking.openURL(`mailto:${dpo.grievance_email}`),
2961
2958
  children: dpo.grievance_email
2962
2959
  }
2963
2960
  )
2964
2961
  ] }) : null,
2965
2962
  "\n"
2966
2963
  ] }) : null,
2967
- (dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2968
- /* @__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: [
2969
2966
  getT("dp_board_text", dpo.dp_board_text),
2970
2967
  " "
2971
2968
  ] }),
2972
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2973
- import_react_native5.Text,
2969
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2970
+ import_react_native6.Text,
2974
2971
  {
2975
2972
  style: [
2976
- styles2.link,
2973
+ styles3.link,
2977
2974
  { color: linkColor },
2978
- activeTTSSegmentKey === "dpo-dp-board-link" ? styles2.ttsHighlight : null
2975
+ activeTTSSegmentKey === "dpo-dp-board-link" ? styles3.ttsHighlight : null
2979
2976
  ],
2980
- onPress: () => import_react_native5.Linking.openURL(dpo.dp_board_url),
2977
+ onPress: () => import_react_native6.Linking.openURL(dpo.dp_board_url),
2981
2978
  children: getT("dp_board_anchor_text", dpo.dp_board_anchor_text)
2982
2979
  }
2983
2980
  ),
2984
2981
  "\n"
2985
2982
  ] }) : null,
2986
- (dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2987
- /* @__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: [
2988
2985
  getT("dpo_text", dpo.dpo_text),
2989
2986
  " "
2990
2987
  ] }),
2991
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2992
- import_react_native5.Text,
2988
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2989
+ import_react_native6.Text,
2993
2990
  {
2994
2991
  style: [
2995
- styles2.link,
2992
+ styles3.link,
2996
2993
  { color: linkColor },
2997
- activeTTSSegmentKey === "dpo-dpo-link" ? styles2.ttsHighlight : null
2994
+ activeTTSSegmentKey === "dpo-dpo-link" ? styles3.ttsHighlight : null
2998
2995
  ],
2999
- onPress: () => import_react_native5.Linking.openURL(dpo.dpo_url),
2996
+ onPress: () => import_react_native6.Linking.openURL(dpo.dpo_url),
3000
2997
  children: getT("dpo_anchor_text", dpo.dpo_anchor_text)
3001
2998
  }
3002
2999
  )
@@ -3004,62 +3001,114 @@ var RedactoNoticeConsent = ({
3004
3001
  ] }) });
3005
3002
  })() : null
3006
3003
  ] }),
3007
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.View, { style: styles2.bottomSection, children: isReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3008
- import_react_native5.TouchableOpacity,
3004
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3005
+ import_react_native6.View,
3009
3006
  {
3010
- style: [styles2.button, styles2.acceptButton, acceptButtonStyle],
3011
- onPress: () => setIsReviewMode(false),
3012
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.Text, { style: [styles2.buttonText, styles2.acceptButtonText, acceptButtonTextStyle], children: reviewModeButtonText || "Update Consent" })
3013
- }
3014
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3015
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3016
- import_react_native5.TouchableOpacity,
3017
- {
3018
- style: [
3019
- styles2.button,
3020
- styles2.acceptButton,
3021
- acceptButtonStyle,
3022
- isSubmitting || !areAllRequiredElementsChecked ? { opacity: 0.5 } : null
3023
- ],
3024
- onPress: handleAccept,
3025
- disabled: isSubmitting || !areAllRequiredElementsChecked,
3026
- accessibilityLabel: isSubmitting ? "Submitting consent" : getTranslatedText("confirm_button_text", (activeConfig == null ? void 0 : activeConfig.confirm_button_text) || "Accept"),
3027
- children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native5.ActivityIndicator, { size: "small", color: acceptTextColor }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3028
- import_react_native5.Text,
3029
- {
3030
- style: [
3031
- styles2.buttonText,
3032
- styles2.acceptButtonText,
3033
- acceptButtonTextStyle,
3034
- activeTTSSegmentKey === "confirm_button_text" ? styles2.ttsHighlight : null
3035
- ],
3036
- 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
+ );
3037
3048
  }
3038
- )
3039
- }
3040
- ),
3041
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3042
- import_react_native5.TouchableOpacity,
3043
- {
3044
- style: [styles2.button, styles2.cancelButton, declineButtonStyle, isSubmitting ? { opacity: 0.5 } : null],
3045
- onPress: handleDecline,
3046
- disabled: isSubmitting,
3047
- accessibilityLabel: getTranslatedText("decline_button_text", (activeConfig == null ? void 0 : activeConfig.decline_button_text) || "Decline"),
3048
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3049
- import_react_native5.Text,
3050
- {
3051
- style: [
3052
- styles2.buttonText,
3053
- styles2.cancelButtonText,
3054
- declineButtonTextStyle,
3055
- activeTTSSegmentKey === "decline_button_text" ? styles2.ttsHighlight : null
3056
- ],
3057
- 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
+ );
3058
3078
  }
3059
- )
3060
- }
3061
- )
3062
- ] }) })
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
+ )
3063
3112
  ] })
3064
3113
  }
3065
3114
  )
@@ -3070,7 +3119,7 @@ var RedactoNoticeConsent = ({
3070
3119
 
3071
3120
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
3072
3121
  var import_react3 = require("react");
3073
- var import_react_native7 = require("react-native");
3122
+ var import_react_native8 = require("react-native");
3074
3123
  var import_react_native_svg4 = __toESM(require("react-native-svg"));
3075
3124
 
3076
3125
  // src/RedactoNoticeConsentInline/api/index.ts
@@ -3195,16 +3244,56 @@ var submitConsentEvent2 = async ({
3195
3244
  }
3196
3245
  };
3197
3246
 
3247
+ // src/shared/notice-consent-status.ts
3248
+ var fetchNoticeConsentStatusForScope = async ({
3249
+ accessToken,
3250
+ ledgerBaseUrl,
3251
+ organisationUuid,
3252
+ workspaceUuid,
3253
+ noticeUuid,
3254
+ signal
3255
+ }) => {
3256
+ if (!accessToken || !ledgerBaseUrl || !organisationUuid || !workspaceUuid || !noticeUuid) {
3257
+ return null;
3258
+ }
3259
+ try {
3260
+ const response = await fetch(
3261
+ `${ledgerBaseUrl}/public/organisations/${organisationUuid}/workspaces/${workspaceUuid}/notices/${noticeUuid}/check-consent`,
3262
+ {
3263
+ method: "POST",
3264
+ headers: {
3265
+ Authorization: `Bearer ${accessToken}`,
3266
+ "Content-Type": "application/json"
3267
+ },
3268
+ body: "{}",
3269
+ signal
3270
+ }
3271
+ );
3272
+ if (!response.ok) {
3273
+ return null;
3274
+ }
3275
+ const data = await response.json();
3276
+ const body = data && typeof data === "object" && "detail" in data && data.detail ? data.detail : data;
3277
+ if (!body || !Array.isArray(body.purposes)) {
3278
+ return null;
3279
+ }
3280
+ return body;
3281
+ } catch {
3282
+ return null;
3283
+ }
3284
+ };
3285
+ var isNoticeFullyConsented = (status) => status.consented && status.all_mandatory_active;
3286
+
3198
3287
  // src/RedactoNoticeConsentInline/styles.ts
3199
- var import_react_native6 = require("react-native");
3200
- var styles3 = import_react_native6.StyleSheet.create({
3288
+ var import_react_native7 = require("react-native");
3289
+ var styles4 = import_react_native7.StyleSheet.create({
3201
3290
  container: {
3202
3291
  width: "100%",
3203
3292
  borderRadius: 8,
3204
3293
  backgroundColor: "#ffffff",
3205
3294
  borderWidth: 1,
3206
3295
  borderColor: "#e5e7eb",
3207
- ...import_react_native6.Platform.select({
3296
+ ...import_react_native7.Platform.select({
3208
3297
  ios: {
3209
3298
  shadowColor: "#000",
3210
3299
  shadowOffset: { width: 0, height: 1 },
@@ -3397,9 +3486,6 @@ var styles3 = import_react_native6.StyleSheet.create({
3397
3486
  color: "#DC2626",
3398
3487
  fontSize: 14
3399
3488
  },
3400
- requiredAsterisk: {
3401
- color: "red"
3402
- },
3403
3489
  purposeChevron: {
3404
3490
  marginLeft: 5,
3405
3491
  alignItems: "center",
@@ -3420,7 +3506,7 @@ var styles3 = import_react_native6.StyleSheet.create({
3420
3506
  minWidth: 120,
3421
3507
  maxHeight: 200,
3422
3508
  marginTop: 4,
3423
- ...import_react_native6.Platform.select({
3509
+ ...import_react_native7.Platform.select({
3424
3510
  ios: {
3425
3511
  shadowColor: "#000",
3426
3512
  shadowOffset: { width: 0, height: 2 },
@@ -3451,7 +3537,7 @@ var styles3 = import_react_native6.StyleSheet.create({
3451
3537
  });
3452
3538
 
3453
3539
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
3454
- var import_jsx_runtime4 = require("react/jsx-runtime");
3540
+ var import_jsx_runtime5 = require("react/jsx-runtime");
3455
3541
  var RedactoConsentInlineComponent = ({
3456
3542
  org_uuid,
3457
3543
  workspace_uuid,
@@ -3762,28 +3848,28 @@ var RedactoConsentInlineComponent = ({
3762
3848
  );
3763
3849
  if (hasAlreadyConsented || fetchError) return null;
3764
3850
  if (isLoading) {
3765
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.loadingContainer, children: [
3766
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.ActivityIndicator, { size: "large", color: "#4f87ff" }),
3767
- /* @__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..." })
3768
3854
  ] });
3769
3855
  }
3770
3856
  if (!content) return null;
3771
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: { gap: 16 }, children: [
3772
- 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,
3773
- supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: [styles3.topSection, { borderBottomWidth: 0, paddingBottom: 0 }], children: [
3774
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native7.View, {}),
3775
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.languageSelectorContainer, children: [
3776
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3777
- 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,
3778
3864
  {
3779
3865
  style: [
3780
- styles3.topRight,
3866
+ styles4.topRight,
3781
3867
  ((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
3782
3868
  ],
3783
3869
  onPress: () => setIsLanguageDropdownOpen((v) => !v),
3784
3870
  children: [
3785
- /* @__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 }),
3786
- /* @__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)(
3787
3873
  import_react_native_svg4.Path,
3788
3874
  {
3789
3875
  d: "M4 6L8 10L12 6",
@@ -3796,34 +3882,34 @@ var RedactoConsentInlineComponent = ({
3796
3882
  ]
3797
3883
  }
3798
3884
  ),
3799
- 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)(
3800
- 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,
3801
3887
  {
3802
3888
  style: [
3803
- styles3.languageItem,
3804
- lang === selectedLanguage ? styles3.selectedLanguageItem : null
3889
+ styles4.languageItem,
3890
+ lang === selectedLanguage ? styles4.selectedLanguageItem : null
3805
3891
  ],
3806
3892
  onPress: () => {
3807
3893
  setSelectedLanguage(lang);
3808
3894
  setIsLanguageDropdownOpen(false);
3809
3895
  },
3810
- 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 })
3811
3897
  },
3812
3898
  lang
3813
3899
  )) }) })
3814
3900
  ] })
3815
3901
  ] }),
3816
- content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { children: [
3817
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.optionItem, children: [
3818
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3819
- 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,
3820
3906
  {
3821
- style: styles3.optionLeft,
3907
+ style: styles4.optionLeft,
3822
3908
  onPress: () => togglePurposeCollapse(purpose.uuid),
3823
3909
  accessibilityRole: "button",
3824
3910
  accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`,
3825
3911
  children: [
3826
- /* @__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)(
3827
3913
  import_react_native_svg4.Path,
3828
3914
  {
3829
3915
  d: "M1 1L6 6L1 11",
@@ -3834,14 +3920,17 @@ var RedactoConsentInlineComponent = ({
3834
3920
  transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
3835
3921
  }
3836
3922
  ) }) }),
3837
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native7.View, { style: styles3.optionTextContainer, children: [
3838
- /* @__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) }),
3839
- /* @__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) })
3840
3929
  ] })
3841
3930
  ]
3842
3931
  }
3843
3932
  ),
3844
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3933
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3845
3934
  Checkbox,
3846
3935
  {
3847
3936
  checked: selectedPurposes[purpose.uuid] || false,
@@ -3852,12 +3941,12 @@ var RedactoConsentInlineComponent = ({
3852
3941
  }
3853
3942
  )
3854
3943
  ] }),
3855
- !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: [
3856
- /* @__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: [
3857
3946
  getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
3858
- 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, {})
3859
3948
  ] }),
3860
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3949
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3861
3950
  Checkbox,
3862
3951
  {
3863
3952
  checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,