@aslaluroba/help-center-react 3.0.6 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.esm.js +92 -55
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +91 -54
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/LanguageContext.d.ts +11 -0
  8. package/dist/lib/index.d.ts +2 -1
  9. package/dist/ui/confirmation-modal/index.d.ts +1 -1
  10. package/dist/useLocalTranslation.d.ts +1 -1
  11. package/package.json +1 -2
  12. package/src/components/shared/Button/button.tsx +3 -3
  13. package/src/components/shared/Card/card.tsx +8 -8
  14. package/src/index.ts +0 -1
  15. package/src/lib/LanguageContext.tsx +28 -0
  16. package/src/lib/index.ts +2 -1
  17. package/src/ui/chatbot-popup/chat-window-screen/footer.tsx +1 -1
  18. package/src/ui/chatbot-popup/chat-window-screen/header.tsx +7 -8
  19. package/src/ui/chatbot-popup/chat-window-screen/index.tsx +1 -1
  20. package/src/ui/chatbot-popup/error-screen/index.tsx +1 -1
  21. package/src/ui/chatbot-popup/home-screen/card.tsx +1 -1
  22. package/src/ui/chatbot-popup/home-screen/index.tsx +2 -2
  23. package/src/ui/chatbot-popup/loading-screen/index.tsx +1 -1
  24. package/src/ui/chatbot-popup/options-list-screen/header.tsx +2 -2
  25. package/src/ui/chatbot-popup/options-list-screen/index.tsx +3 -3
  26. package/src/ui/chatbot-popup/options-list-screen/option-card.tsx +1 -1
  27. package/src/ui/confirmation-modal/index.tsx +1 -1
  28. package/src/ui/floating-message.tsx +1 -1
  29. package/src/ui/help-center.tsx +26 -4
  30. package/src/ui/help-popup.tsx +3 -3
  31. package/src/ui/review-dialog/index.tsx +6 -6
  32. package/src/ui/review-dialog/rating.tsx +7 -7
  33. package/src/useLocalTranslation.ts +6 -5
  34. package/dist/core/SignalRService.d.ts +0 -11
  35. package/src/core/SignalRService.ts +0 -83
package/dist/index.js CHANGED
@@ -482,6 +482,24 @@ class ConfigService {
482
482
  }
483
483
  var configService = ConfigService.getInstance();
484
484
 
485
+ var LanguageContext = /*#__PURE__*/React.createContext(null);
486
+ var LanguageProvider = _ref => {
487
+ var {
488
+ children,
489
+ language
490
+ } = _ref;
491
+ return jsxRuntime.jsx(LanguageContext.Provider, {
492
+ value: {
493
+ language
494
+ },
495
+ children: children
496
+ });
497
+ };
498
+ var useLanguage = () => {
499
+ var context = React.useContext(LanguageContext);
500
+ return context;
501
+ };
502
+
485
503
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
486
504
 
487
505
  const CLASS_PART_SEPARATOR = '-';
@@ -3548,9 +3566,9 @@ var iconMap = {
3548
3566
  thumbsUp: IconThumbUp
3549
3567
  };
3550
3568
  var sizeMap = {
3551
- sm: 'w-4 h-4',
3552
- md: 'w-6 h-6',
3553
- lg: 'w-8 h-8'
3569
+ sm: 'babylai-w-4 babylai-h-4',
3570
+ md: 'babylai-w-6 babylai-h-6',
3571
+ lg: 'babylai-w-8 babylai-h-8'
3554
3572
  };
3555
3573
  var Rating = /*#__PURE__*/React__namespace.forwardRef((_ref, ref) => {
3556
3574
  var {
@@ -3580,12 +3598,12 @@ var Rating = /*#__PURE__*/React__namespace.forwardRef((_ref, ref) => {
3580
3598
  };
3581
3599
  return jsxRuntime.jsx("div", _objectSpread2(_objectSpread2({
3582
3600
  ref: ref,
3583
- className: cn('flex items-center', className)
3601
+ className: cn('babylai-flex babylai-items-center', className)
3584
3602
  }, props), {}, {
3585
3603
  children: [...Array(max)].map((_, index) => {
3586
3604
  var filled = (hoverValue !== null ? hoverValue : value) > index;
3587
3605
  return jsxRuntime.jsx(Icon, {
3588
- className: cn(sizeMap[size], 'cursor-pointer transition-colors', filled ? 'text-yellow-400 fill-yellow-400' : 'text-gray-300', readOnly && 'cursor-default'),
3606
+ className: cn(sizeMap[size], 'babylai-cursor-pointer babylai-transition-colors', filled ? 'babylai-text-yellow-400 babylai-fill-yellow-400' : 'babylai-text-gray-300', readOnly && 'babylai-cursor-default'),
3589
3607
  onMouseEnter: () => handleMouseEnter(index + 1),
3590
3608
  onMouseLeave: handleMouseLeave,
3591
3609
  onClick: () => handleClick(index + 1),
@@ -3691,8 +3709,10 @@ var createHelpCenterI18n = function createHelpCenterI18n() {
3691
3709
  return instance;
3692
3710
  };
3693
3711
 
3694
- var useLocalTranslation = languageFromProps => {
3695
- var language = languageFromProps || localStorage.getItem("app-language") || defaultLanguage;
3712
+ var useLocalTranslation = () => {
3713
+ // Get language from context, fallback to default if not available
3714
+ var context = useLanguage();
3715
+ var language = (context === null || context === void 0 ? void 0 : context.language) || defaultLanguage;
3696
3716
  var i18n = React.useMemo(() => createHelpCenterI18n(language), [language]);
3697
3717
  var t = key => i18n.t(key);
3698
3718
  var dir = i18n.dir();
@@ -3777,7 +3797,7 @@ var ReviewDialog = props => {
3777
3797
  return jsxRuntime.jsxs("section", {
3778
3798
  className: "babylai-p-6 babylai-gap-6 babylai-max-w-sm babylai-max-h-[calc(100vh-90px)] babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 dark:babylai-bg-storm-dust-950 babylai-fixed babylai-bottom-20 babylai-right-0 md:babylai-right-4 babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col",
3779
3799
  children: [jsxRuntime.jsxs("header", {
3780
- className: 'border-b pb-4 babylai-flex babylai-items-center babylai-justify-between babylai-gap-4',
3800
+ className: 'babylai-border-b babylai-pb-4 babylai-flex babylai-items-center babylai-justify-between babylai-gap-4',
3781
3801
  children: [jsxRuntime.jsx("h2", {
3782
3802
  className: "babylai-text-lg babylai-font-semibold dark:babylai-text-white",
3783
3803
  children: t('homeSdk.ReviewDialog.title')
@@ -3788,7 +3808,7 @@ var ReviewDialog = props => {
3788
3808
  }), jsxRuntime.jsxs("div", {
3789
3809
  className: "babylai-flex babylai-flex-col babylai-gap-2",
3790
3810
  children: [jsxRuntime.jsx("p", {
3791
- className: "babylai-text-sm babylai-text-gray-600 mb-3 dark:babylai-text-white",
3811
+ className: "babylai-text-sm babylai-text-gray-600 babylai-mb-3 dark:babylai-text-white",
3792
3812
  children: t('homeSdk.ReviewDialog.description')
3793
3813
  }), jsxRuntime.jsxs("div", {
3794
3814
  className: "babylai-flex babylai-items-center babylai-gap-2",
@@ -3799,7 +3819,7 @@ var ReviewDialog = props => {
3799
3819
  value: rating,
3800
3820
  onChange: handleRatingChange
3801
3821
  }), jsxRuntime.jsx("span", {
3802
- className: "babylai-text-sm babylai-text-red-500 transition-opacity duration-300 ".concat(error.rating ? 'opacity-100' : 'opacity-0'),
3822
+ className: "babylai-text-sm babylai-text-red-500 babylai-transition-opacity babylai-duration-300 ".concat(error.rating ? 'babylai-opacity-100' : 'babylai-opacity-0'),
3803
3823
  children: error.rating
3804
3824
  })]
3805
3825
  }), jsxRuntime.jsxs("div", {
@@ -3816,18 +3836,18 @@ var ReviewDialog = props => {
3816
3836
  value: comment,
3817
3837
  onChange: e => handleCommentChange(e.target.value)
3818
3838
  }), jsxRuntime.jsx("span", {
3819
- className: "babylai-text-sm babylai-text-red-500 transition-opacity duration-300 ".concat(error.comment ? 'opacity-100' : 'opacity-0'),
3839
+ className: "babylai-text-sm babylai-text-red-500 babylai-transition-opacity babylai-duration-300 ".concat(error.comment ? 'babylai-opacity-100' : 'babylai-opacity-0'),
3820
3840
  children: error.comment
3821
3841
  })]
3822
3842
  })]
3823
3843
  }), jsxRuntime.jsxs("footer", {
3824
3844
  className: "babylai-flex babylai-justify-between babylai-gap-4 babylai-border-t babylai-pt-4",
3825
3845
  children: [jsxRuntime.jsx("button", {
3826
- className: "babylai-px-4 babylai-py-2 babylai-rounded-lg babylai-bg-gray-200 babylai-text-gray-700 hover:babylai-bg-gray-300 transition-all",
3846
+ className: "babylai-px-4 babylai-py-2 babylai-rounded-lg babylai-bg-gray-200 babylai-text-gray-700 hover:babylai-bg-gray-300 babylai-transition-all",
3827
3847
  onClick: props.onClose,
3828
3848
  children: t('homeSdk.ReviewDialog.skip_button')
3829
3849
  }), jsxRuntime.jsx("button", {
3830
- className: 'babylai-px-4 babylai-py-2 babylai-rounded-lg babylai-shadow transition-all babylai-bg-primary-500 babylai-text-white hover:babylai-bg-primary-600',
3850
+ className: 'babylai-px-4 babylai-py-2 babylai-rounded-lg babylai-shadow babylai-transition-all babylai-bg-primary-500 babylai-text-white hover:babylai-bg-primary-600',
3831
3851
  onClick: validateAndSubmit,
3832
3852
  children: t('homeSdk.ReviewDialog.submit_button')
3833
3853
  })]
@@ -13765,7 +13785,7 @@ function FloatingMessage(_ref) {
13765
13785
  className: "babylai-text-xs babylai-font-bold babylai-m-0",
13766
13786
  children: message
13767
13787
  }), jsxRuntime.jsx("button", {
13768
- className: "babylai-absolute babylai--top-2 babylai--right-2 babylai-w-5 babylai-h-5 babylai-rounded-full babylai-bg-white babylai-border-none babylai-cursor-pointer babylai-flex babylai-items-center babylai-justify-center babylai-text-black babylai-p-[3px] babylai-hover:bg-primary-400 babylai-hover:text-white shadow-md",
13788
+ className: "babylai-absolute babylai--top-2 babylai--right-2 babylai-w-5 babylai-h-5 babylai-rounded-full babylai-bg-white babylai-border-none babylai-cursor-pointer babylai-flex babylai-items-center babylai-justify-center babylai-text-black-white-700 babylai-p-[3px] hover:babylai-bg-primary-400 babylai-hover:text-white babylai-shadow-md",
13769
13789
  onClick: onClose,
13770
13790
  children: jsxRuntime.jsx(CloseIcon, {
13771
13791
  className: "babylai-w-8 babylai-h-8"
@@ -31695,11 +31715,11 @@ var buttonVariants = cva('babylai-inline-flex babylai-items-center babylai-justi
31695
31715
  variants: {
31696
31716
  variant: {
31697
31717
  default: 'babylai-bg-primary-500 babylai-p-2 babylai-text-white babylai-text-xs babylai-font-semibold hover:babylai-bg-primary-600',
31698
- destructive: 'babylai-bg-destructive babylai-p-2 babylai-text-destructive-foreground babylai-shadow-sm babylai-hover:babylai-bg-destructive/90',
31718
+ destructive: 'babylai-bg-destructive babylai-p-2 babylai-text-destructive-foreground babylai-shadow-sm hover:babylai-bg-destructive/90',
31699
31719
  outline: 'babylai-border babylai-border-primary-500 babylai-bg-background-transparent hover:babylai-border-primary-600 hover:babylai-text-primary-600 babylai-text-primary-500 babylai-font-bold',
31700
31720
  secondary: 'babylai-bg-secondary babylai-p-2 babylai-text-secondary-foreground babylai-shadow-sm babylai-hover:babylai-bg-secondary/80',
31701
- ghost: 'babylai-bg-transparent babylai-p-2 babylai-text-secondary-foreground babylai-shadow-sm babylai-hover:babylai-bg-secondary/80',
31702
- link: 'babylai-text-primary babylai-underline-offset-4 babylai-hover:babylai-underline',
31721
+ ghost: 'babylai-bg-transparent babylai-p-2 babylai-text-secondary-foreground babylai-shadow-sm hover:babylai-bg-secondary/80',
31722
+ link: 'babylai-text-primary babylai-underline-offset-4 hover:babylai-underline',
31703
31723
  'rounded-icon': '!babylai-p-2'
31704
31724
  },
31705
31725
  size: {
@@ -31746,9 +31766,9 @@ var Card$2 = /*#__PURE__*/React__namespace.forwardRef((_ref, ref) => {
31746
31766
  } = _ref,
31747
31767
  props = _objectWithoutProperties(_ref, _excluded$9);
31748
31768
  var variantStyles = {
31749
- default: 'rounded-xl border bg-card text-card-foreground shadow',
31750
- rounded: 'rounded-3xl bg-black-white-50 py-4 px-3',
31751
- shadowed: 'rounded-xl border bg-card text-card-foreground shadow-lg'
31769
+ default: 'babylai-rounded-xl babylai-border babylai-bg-card babylai-text-card-foreground babylai-shadow',
31770
+ rounded: 'babylai-rounded-3xl babylai-bg-black-white-50 babylai-py-4 babylai-px-3',
31771
+ shadowed: 'babylai-rounded-xl babylai-border babylai-bg-card babylai-text-card-foreground babylai-shadow-lg'
31752
31772
  };
31753
31773
  return jsxRuntime.jsx("div", _objectSpread2({
31754
31774
  ref: ref,
@@ -31763,7 +31783,7 @@ var CardHeader = /*#__PURE__*/React__namespace.forwardRef((_ref2, ref) => {
31763
31783
  props = _objectWithoutProperties(_ref2, _excluded2);
31764
31784
  return jsxRuntime.jsx("div", _objectSpread2({
31765
31785
  ref: ref,
31766
- className: cn('flex flex-col space-y-1.5 p-6', className)
31786
+ className: cn('babylai-flex babylai-flex-col babylai-space-y-1.5 babylai-p-6', className)
31767
31787
  }, props));
31768
31788
  });
31769
31789
  CardHeader.displayName = 'CardHeader';
@@ -31774,7 +31794,7 @@ var CardTitle = /*#__PURE__*/React__namespace.forwardRef((_ref3, ref) => {
31774
31794
  props = _objectWithoutProperties(_ref3, _excluded3);
31775
31795
  return jsxRuntime.jsx("div", _objectSpread2({
31776
31796
  ref: ref,
31777
- className: cn('font-semibold leading-none tracking-tight', className)
31797
+ className: cn('babylai-font-semibold babylai-leading-none babylai-tracking-tight', className)
31778
31798
  }, props));
31779
31799
  });
31780
31800
  CardTitle.displayName = 'CardTitle';
@@ -31785,7 +31805,7 @@ var CardDescription = /*#__PURE__*/React__namespace.forwardRef((_ref4, ref) => {
31785
31805
  props = _objectWithoutProperties(_ref4, _excluded4);
31786
31806
  return jsxRuntime.jsx("div", _objectSpread2({
31787
31807
  ref: ref,
31788
- className: cn('text-sm text-muted-foreground', className)
31808
+ className: cn('babylai-text-sm babylai-text-muted-foreground', className)
31789
31809
  }, props));
31790
31810
  });
31791
31811
  CardDescription.displayName = 'CardDescription';
@@ -31796,7 +31816,7 @@ var CardContent = /*#__PURE__*/React__namespace.forwardRef((_ref5, ref) => {
31796
31816
  props = _objectWithoutProperties(_ref5, _excluded5);
31797
31817
  return jsxRuntime.jsx("div", _objectSpread2({
31798
31818
  ref: ref,
31799
- className: cn('p-6 pt-0', className)
31819
+ className: cn('babylai-p-6 babylai-pt-0', className)
31800
31820
  }, props));
31801
31821
  });
31802
31822
  CardContent.displayName = 'CardContent';
@@ -31807,7 +31827,7 @@ var CardFooter = /*#__PURE__*/React__namespace.forwardRef((_ref6, ref) => {
31807
31827
  props = _objectWithoutProperties(_ref6, _excluded6);
31808
31828
  return jsxRuntime.jsx("div", _objectSpread2({
31809
31829
  ref: ref,
31810
- className: cn('flex items-center p-6 pt-0', className)
31830
+ className: cn('babylai-flex babylai-items-center babylai-p-6 babylai-pt-0', className)
31811
31831
  }, props));
31812
31832
  });
31813
31833
  CardFooter.displayName = 'CardFooter';
@@ -31857,7 +31877,7 @@ var ChatWindowFooter = props => {
31857
31877
  size: 'icon',
31858
31878
  onClick: props.handleSendMessage,
31859
31879
  disabled: props === null || props === void 0 ? void 0 : props.isLoading,
31860
- className: 'babylai-rounded-full babylai-bg-purple-500 babylai-hover:babylai-bg-purple-600 babylai-w-8 babylai-h-8 babylai-disabled:babylai-opacity-50',
31880
+ className: 'babylai-rounded-full babylai-bg-purple-500 babylai-hover:babylai-bg-purple-600 babylai-w-8 babylai-h-8 disabled:babylai-opacity-50',
31861
31881
  children: jsxRuntime.jsx(EnvelopeIcon, {
31862
31882
  className: "babylai-w-4 babylai-h-4 ".concat(dir === 'rtl' ? 'babylai-rotate-270' : '')
31863
31883
  })
@@ -31937,7 +31957,7 @@ var MessageComponent = /*#__PURE__*/React__default["default"].memo(_ref => {
31937
31957
  } = _ref;
31938
31958
  var isFirstInSequence = index === 0 || messages[index - 1].senderType !== message.senderType;
31939
31959
  var isFirstHumanAgentMessage = index === firstHumanAgentIndex && message.senderType === 2;
31940
- var textDirection = message.senderType === 1 ? 'justify-end' : 'justify-start';
31960
+ var textDirection = message.senderType === 1 ? 'babylai-justify-end' : 'babylai-justify-start';
31941
31961
  return jsxRuntime.jsxs("div", {
31942
31962
  children: [isFirstHumanAgentMessage && jsxRuntime.jsx("div", {
31943
31963
  className: 'babylai-flex babylai-justify-center babylai-items-center babylai-my-4',
@@ -32204,26 +32224,26 @@ var ChatWindowHeader = props => {
32204
32224
  className: "babylai-bg-primary-500/10 dark:babylai-bg-storm-dust-950",
32205
32225
  onClick: props.handleBack,
32206
32226
  children: [jsxRuntime.jsx(ArrowRight, {
32207
- className: "!babylai-w-[12px] babylai-h-[12px] ".concat(isRTL ? "" : "babylai-rotate-180", " babylai-text-primary-500 dark:babylai-text-white")
32227
+ className: "!babylai-w-3 babylai-h-3 ".concat(isRTL ? "" : "babylai-rotate-180", " babylai-text-primary-500 dark:babylai-text-white")
32208
32228
  }), " "]
32209
32229
  }), jsxRuntime.jsxs("div", {
32210
- className: "babylai-relative babylai-mr-2",
32230
+ className: "babylai-relative babylai-me-2",
32211
32231
  children: [jsxRuntime.jsx(Button, {
32212
32232
  variant: "rounded-icon",
32213
32233
  size: "icon",
32214
32234
  className: "babylai-bg-primary-500/10 dark:babylai-bg-storm-dust-950",
32215
32235
  onClick: () => setShowMenu(!showMenu),
32216
32236
  children: jsxRuntime.jsx(ThreeDots, {
32217
- className: "babylai-w-[14px] babylai-h-[4px] babylai-text-primary-500 dark:babylai-text-white"
32237
+ className: "babylai-w-3.5 babylai-h-1 babylai-text-primary-500 dark:babylai-text-white"
32218
32238
  })
32219
32239
  }), showMenu && jsxRuntime.jsx("div", {
32220
- className: "babylai-absolute babylai-top-10 babylai-start-0 babylai-w-48 babylai-rounded-md babylai-shadow-lg babylai-bg-white dark:!babylai-bg-storm-dust-950 babylai-ring-1 babylai-ring-black babylai-ring-opacity-5 babylai-z-10",
32240
+ className: "babylai-absolute babylai-top-10 babylai-start-0 babylai-w-48 babylai-rounded-md babylai-shadow-lg babylai-bg-white dark:!babylai-bg-storm-dust-950 babylai-ring-1 babylai-ring-black-white-700 babylai-ring-opacity-5 babylai-z-10",
32221
32241
  children: jsxRuntime.jsx("div", {
32222
32242
  className: "babylai-py-1",
32223
32243
  role: "menu",
32224
32244
  "aria-orientation": "vertical",
32225
32245
  children: jsxRuntime.jsx("button", {
32226
- className: "babylai-block babylai-px-4 babylai-py-2 babylai-text-sm babylai-text-gray-700 dark:babylai-text-white babylai-hover:babylai-bg-gray-100 babylai-w-full babylai-text-left",
32246
+ className: "babylai-block babylai-px-4 babylai-py-2 babylai-text-sm babylai-text-gray-700 dark:babylai-text-white hover:babylai-bg-gray-100 babylai-w-full babylai-text-start",
32227
32247
  role: "menuitem",
32228
32248
  onClick: e => {
32229
32249
  e.stopPropagation();
@@ -32235,11 +32255,8 @@ var ChatWindowHeader = props => {
32235
32255
  })
32236
32256
  })]
32237
32257
  })]
32238
- }), jsxRuntime.jsx("div", {
32239
- className: "babylai-flex babylai-items-center babylai-gap-2 babylai-absolute babylai-left-1/2 babylai-transform babylai--translate-x-1/2",
32240
- children: jsxRuntime.jsx(Logo, {
32241
- className: "babylai-w-[124px] babylai-h-auto dark:babylai-text-white"
32242
- })
32258
+ }), jsxRuntime.jsx(Logo, {
32259
+ className: "babylai-w-[124px] babylai-h-auto dark:babylai-text-white"
32243
32260
  })]
32244
32261
  });
32245
32262
  };
@@ -32264,7 +32281,7 @@ var ChatBotErrorScreen = props => {
32264
32281
  return jsxRuntime.jsx("div", {
32265
32282
  className: "babylai-w-full babylai-h-full babylai-bg-black-white-50 babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col",
32266
32283
  children: jsxRuntime.jsxs("div", {
32267
- className: "h-full babylai-rounded-3xl babylai-flex babylai-flex-col babylai-bg-gradient-to-b babylai-from-primary-500 babylai-to-primary-500/60 babylai-py-6 md:babylai-py-8 babylai-px-6 gap-4 md:gap-8",
32284
+ className: "babylai-h-full babylai-rounded-3xl babylai-flex babylai-flex-col babylai-bg-gradient-to-b babylai-from-primary-500 babylai-to-primary-500/60 babylai-py-6 md:babylai-py-8 babylai-px-6 babylai-gap-4 md:babylai-gap-8",
32268
32285
  children: [jsxRuntime.jsx(Header, {
32269
32286
  onClose: props.onClose
32270
32287
  }), jsxRuntime.jsx("div", {
@@ -32285,7 +32302,7 @@ var Card = props => {
32285
32302
  } = useLocalTranslation();
32286
32303
  var isLTR = dir === "ltr";
32287
32304
  return jsxRuntime.jsxs("div", {
32288
- className: "babylai-flex babylai-items-center babylai-justify-between babylai-gap-4 babylai-bg-black-white-50 babylai-rounded-3xl babylai-p-6",
32305
+ className: "babylai-flex babylai-items-center babylai-justify-between babylai-gap-4 babylai-bg-black-white-50 babylai-rounded-3xl babylai-p-6",
32289
32306
  children: [jsxRuntime.jsx("p", {
32290
32307
  className: "babylai-text-base md:babylai-text-lg babylai-font-medium babylai-text-black-white-800",
32291
32308
  children: props.text
@@ -32347,14 +32364,14 @@ var HomeScreen = props => {
32347
32364
  window.location.href = url.toString();
32348
32365
  };
32349
32366
  return jsxRuntime.jsxs("div", {
32350
- className: "babylai-h-full babylai-flex babylai-flex-col babylai-overflow-y-auto babylai-py-6 md:babylai-py-8 babylai-px-6 gap-4 md:gap-8",
32367
+ className: "babylai-h-full babylai-flex babylai-flex-col babylai-overflow-y-auto babylai-py-6 md:babylai-py-8 babylai-px-6 babylai-gap-4 md:babylai-gap-8",
32351
32368
  children: [jsxRuntime.jsx(Header, {
32352
32369
  onClose: props.onClose
32353
32370
  }), jsxRuntime.jsxs("h1", {
32354
32371
  className: "babylai-text-2xl md:babylai-text-4xl babylai-font-bold babylai-text-white",
32355
32372
  children: [t('homeSdk.chatTitle'), jsxRuntime.jsx("br", {}), "BabylAI \uD83D\uDE80"]
32356
32373
  }), jsxRuntime.jsxs("div", {
32357
- className: "babylai-flex babylai-flex-col gap-3",
32374
+ className: "babylai-flex babylai-flex-col babylai-gap-3",
32358
32375
  children: [jsxRuntime.jsx(ChatNowCard$1, {
32359
32376
  setIsShowList: props.setIsShowList
32360
32377
  }), jsxRuntime.jsx(Card$1, {
@@ -32373,7 +32390,7 @@ var ChatBotLoadingScreen = props => {
32373
32390
  return jsxRuntime.jsx("div", {
32374
32391
  className: "babylai-w-full babylai-h-full babylai-bg-black-white-50 dark:babylai-bg-storm-dust-950 babylai-rounded-3xl babylai-shadow-lg babylai-flex babylai-flex-col",
32375
32392
  children: jsxRuntime.jsxs("div", {
32376
- className: cn('babylai-rounded-3xl babylai-h-full babylai-flex babylai-flex-col babylai-py-6 md:babylai-py-8 babylai-px-6 gap-4 md:gap-8', {
32393
+ className: cn('babylai-rounded-3xl babylai-h-full babylai-flex babylai-flex-col babylai-py-6 md:babylai-py-8 babylai-px-6 babylai-gap-4 md:babylai-gap-8', {
32377
32394
  'babylai-bg-gradient-to-b babylai-from-primary-500 babylai-to-primary-500/60': !props.isShowList,
32378
32395
  'babylai-bg-black-white-100 dark:babylai-bg-storm-dust-950': props.isShowList
32379
32396
  }),
@@ -32485,7 +32502,7 @@ var OptionsListHeader = _ref => {
32485
32502
  var isRTL = dir === "rtl";
32486
32503
  return jsxRuntime.jsxs("header", {
32487
32504
  dir: dir,
32488
- className: "babylai-flex babylai-w-full babylai-items-center mb-2 ".concat(!showHelpScreen ? "babylai-justify-end" : "babylai-justify-between"),
32505
+ className: "babylai-flex babylai-w-full babylai-items-center babylai-mb-2 ".concat(!showHelpScreen ? "babylai-justify-end" : "babylai-justify-between"),
32489
32506
  children: [jsxRuntime.jsx(Button, {
32490
32507
  variant: "rounded-icon",
32491
32508
  size: "icon",
@@ -32497,7 +32514,7 @@ var OptionsListHeader = _ref => {
32497
32514
  className: "!babylai-w-full !babylai-h-full babylai-cursor-pointer"
32498
32515
  })
32499
32516
  }), jsxRuntime.jsx(ThinkingLogo, {
32500
- className: "babylai-w-40 babylai-h-40 babylai-text-primary-500 babylai-absolute babylai-top-0 babylai-end-1 babylai-overflow-hidden"
32517
+ className: "babylai-w-40 babylai-h-40 babylai-text-primary-500 babylai-absolute babylai-top-0 babylai-right-1 babylai-overflow-hidden"
32501
32518
  })]
32502
32519
  });
32503
32520
  };
@@ -32516,7 +32533,7 @@ var OptionCard = props => {
32516
32533
  size: "icon",
32517
32534
  className: "babylai-text-primary-500 hover:babylai-bg-primary-100",
32518
32535
  children: jsxRuntime.jsx(ArrowRight, {
32519
- className: "babylai-w-[12px] babylai-h-[12px] ".concat(isLTR ? "" : "babylai-rotate-180", " babylai-text-primary-500")
32536
+ className: "babylai-w-3 babylai-h-3 ".concat(isLTR ? "" : "babylai-rotate-180", " babylai-text-primary-500")
32520
32537
  })
32521
32538
  })]
32522
32539
  });
@@ -32541,18 +32558,18 @@ var OptionsListScreen = _ref => {
32541
32558
  }
32542
32559
  };
32543
32560
  return jsxRuntime.jsxs("div", {
32544
- className: 'babylai-px-8 babylai-pb-12 babylai-pt-8 babylai-overflow-y-auto babylai-h-full',
32561
+ className: 'babylai-px-8 babylai-pb-12 babylai-pt-8 babylai-overflow-y-auto babylai-h-full',
32545
32562
  children: [jsxRuntime.jsx(OptionsListHeader$1, {
32546
32563
  handleBack: handleBack,
32547
32564
  showHelpScreen: showHelpScreen
32548
32565
  }), jsxRuntime.jsx("h1", {
32549
- className: 'babylai-text-4xl babylai-font-bold mb-4 babylai-text-black-white-800 dark:babylai-text-white',
32566
+ className: 'babylai-text-4xl babylai-font-bold babylai-mb-4 babylai-text-black-white-800 dark:babylai-text-white',
32550
32567
  children: helpScreen === null || helpScreen === void 0 ? void 0 : helpScreen.title
32551
32568
  }), helpScreen && jsxRuntime.jsx("div", {
32552
32569
  className: 'babylai-flex babylai-flex-col babylai-gap-3 babylai-mt-3 babylai-mb-3',
32553
32570
  children: (_a = helpScreen === null || helpScreen === void 0 ? void 0 : helpScreen.options) === null || _a === void 0 ? void 0 : _a.map(option => jsxRuntime.jsxs(Card$2, {
32554
32571
  variant: 'rounded',
32555
- className: 'babylai-cursor-pointer babylai-transition-all babylai-hover:babylai-shadow-md !babylai-px-2 !babylai-py-1 dark:!babylai-bg-storm-dust-900',
32572
+ className: 'babylai-cursor-pointer babylai-transition-all hover:babylai-shadow-md !babylai-px-2 !babylai-py-1 dark:!babylai-bg-storm-dust-900',
32556
32573
  onClick: () => handleToggleExpandOption(option),
32557
32574
  children: [jsxRuntime.jsx(OptionCard$1, {
32558
32575
  title: option.title
@@ -32820,7 +32837,7 @@ function HelpPopup(_ref) {
32820
32837
  // Early returns for performance - moved after all hooks
32821
32838
  if (status === 'loading' && !helpScreen) {
32822
32839
  return jsxRuntime.jsx("div", {
32823
- className: 'babylai-fixed babylai-inset-0 md:babylai-inset-auto md:babylai-max-w-sm md:babylai-min-w-sm md:babylai-h-[calc(100vh-240px) babylai-max-h-[800px]]\n babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 md:babylai-mb-4\nmd:babylai-bottom-[6rem] md:babylai-right-4 babylai-rounded-none md:babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col',
32840
+ className: 'babylai-fixed babylai-inset-0 md:babylai-inset-auto md:babylai-max-w-sm md:babylai-h-[calc(100vh-240px)] babylai-max-h-[800px]\n babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 md:babylai-mb-4\nmd:babylai-bottom-[6rem] md:babylai-right-4 babylai-rounded-none md:babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col',
32824
32841
  children: jsxRuntime.jsx(ChatBotLoadingScreen$1, {
32825
32842
  isShowList: isShowList,
32826
32843
  onClose: onClose
@@ -32829,7 +32846,7 @@ function HelpPopup(_ref) {
32829
32846
  }
32830
32847
  if (error) {
32831
32848
  return jsxRuntime.jsx("div", {
32832
- className: 'babylai-fixed babylai-inset-0 md:babylai-inset-auto md:babylai-max-w-sm md:babylai-min-w-sm md:babylai-h-[calc(100vh-240px) babylai-max-h-[800px]]\n babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 md:babylai-mb-4\nmd:babylai-bottom-[6rem] md:babylai-right-4 babylai-rounded-none md:babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col',
32849
+ className: 'babylai-fixed babylai-inset-0 md:babylai-inset-auto md:babylai-max-w-sm md:babylai-h-[calc(100vh-240px)] babylai-max-h-[800px]\n babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 md:babylai-mb-4\nmd:babylai-bottom-[6rem] md:babylai-right-4 babylai-rounded-none md:babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col',
32833
32850
  children: jsxRuntime.jsx(ChatBotErrorScreen$1, {
32834
32851
  onClose: onClose,
32835
32852
  error: error || ''
@@ -32837,7 +32854,7 @@ function HelpPopup(_ref) {
32837
32854
  });
32838
32855
  }
32839
32856
  return jsxRuntime.jsx("div", {
32840
- className: 'babylai-fixed babylai-inset-0 md:babylai-inset-auto md:babylai-max-w-sm md:babylai-min-w-sm md:babylai-h-[calc(100vh-240px)] babylai-max-h-[800px]\n babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 md:babylai-mb-4\nmd:babylai-bottom-[6rem] md:babylai-right-4 babylai-rounded-none md:babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col',
32857
+ className: 'babylai-fixed babylai-inset-0 md:babylai-inset-auto md:babylai-max-w-sm md:babylai-h-[calc(100vh-240px)] babylai-max-h-[800px]\n babylai-overflow-auto babylai-w-full babylai-bg-black-white-50 md:babylai-mb-4\nmd:babylai-bottom-[6rem] md:babylai-right-4 babylai-rounded-none md:babylai-rounded-3xl babylai-shadow-lg babylai-z-50 babylai-flex babylai-flex-col',
32841
32858
  children: jsxRuntime.jsxs("div", {
32842
32859
  className: cn('babylai-h-full babylai-rounded-none md:babylai-rounded-3xl babylai-flex babylai-flex-col babylai-relative', {
32843
32860
  'babylai-bg-gradient-to-b babylai-from-primary-500 babylai-to-primary-500/60': !isShowList,
@@ -32853,18 +32870,17 @@ function HelpPopup(_ref) {
32853
32870
  });
32854
32871
  }
32855
32872
 
32856
- function HelpCenter(_ref) {
32873
+ function HelpCenterContent(_ref) {
32857
32874
  var {
32858
32875
  helpScreenId,
32859
32876
  user,
32860
32877
  showArrow = true,
32861
- language = defaultLanguage,
32862
32878
  messageLabel = null,
32863
32879
  showHelpScreen = false
32864
32880
  } = _ref;
32865
32881
  var {
32866
32882
  t
32867
- } = useLocalTranslation(language);
32883
+ } = useLocalTranslation();
32868
32884
  var [isOpen, setIsOpen] = React.useState(false);
32869
32885
  var [showArrowAnimation, setShowArrowAnimation] = React.useState(showArrow);
32870
32886
  var [helpScreenData, setHelpScreenData] = React.useState(null);
@@ -33114,6 +33130,27 @@ function HelpCenter(_ref) {
33114
33130
  })]
33115
33131
  });
33116
33132
  }
33133
+ // Main HelpCenter component that provides the language context
33134
+ function HelpCenter(_ref8) {
33135
+ var {
33136
+ helpScreenId,
33137
+ user,
33138
+ showArrow = true,
33139
+ language = defaultLanguage,
33140
+ messageLabel = null,
33141
+ showHelpScreen = false
33142
+ } = _ref8;
33143
+ return jsxRuntime.jsx(LanguageProvider, {
33144
+ language: language,
33145
+ children: jsxRuntime.jsx(HelpCenterContent, {
33146
+ helpScreenId: helpScreenId,
33147
+ user: user,
33148
+ showArrow: showArrow,
33149
+ messageLabel: messageLabel,
33150
+ showHelpScreen: showHelpScreen
33151
+ })
33152
+ });
33153
+ }
33117
33154
 
33118
33155
  function bind(fn, thisArg) {
33119
33156
  return function wrap() {