'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var AchievementCard = require('./AchievementCard-98d6c7f9.js');
var BoostGenericCard = require('./BoostGenericCard-7fadd6af.js');
var BoostSmallCard = require('./BoostSmallCard-2141fdd9.js');
var Button = require('./Button-9ebe120c.js');
var CertificateDisplayCard = require('./CertificateDisplayCard-3dd9a3f8.js');
var VerifierStateBadgeAndText = require('./VerifierStateBadgeAndText-af68fd70.js');
var CircleCheckButton = require('./CircleCheckButton-f76e5b5d.js');
var CircleIcon = require('./CircleIcon-f0fa68c7.js');
var CourseCard = require('./CourseCard-bc699307.js');
var CourseVerticalCard = require('./CourseVerticalCard-0a8ea4dc.js');
var FlippyCard = require('./FlippyCard-bf0fd493.js');
var GenericCard = require('./GenericCard-2b20ab4b.js');
var JobHistoryCard = require('./JobHistoryCard-e9ac7a1a.js');
var JobListCard = require('./JobListCard-c53660e8.js');
var LearnCardCreditCardBackFace = require('./LearnCardCreditCardBackFace-62330eea.js');
var LearnCardCreditCardFrontFace = require('./LearnCardCreditCardFrontFace-aca1b7bc.js');
var LearnPill = require('./LearnPill-da2d2a8e.js');
var Lightbox = require('./Lightbox-d72e19ba.js');
var CircleSpinner = require('./CircleSpinner-f518569a.js');
var MeritBadgeDisplayCard = require('./MeritBadgeDisplayCard-2a690a63.js');
var MeritBadgeSkillsCount = require('./MeritBadgeSkillsCount-ae6e8ed4.js');
var MiniVCThumbnail = require('./MiniVCThumbnail-9c510f51.js');
var Notification = require('./Notification-24d4de25.js');
var types = require('./types-91d0677b.js');
var NotificationBoostCard = require('./NotificationBoostCard-c4679a33.js');
var NotificationUserAcceptedBoostCard = require('./NotificationUserAcceptedBoostCard-1c6d1e33.js');
var NotificationUserCard = require('./NotificationUserCard-4364506c.js');
var types$1 = require('./types-e4d9a257.js');
var QRCodeCard = require('./QRCodeCard-f0079bd9.js');
var RoundedPill = require('./RoundedPill-b54f3ac1.js');
var constants = require('./constants-2430d4bc.js');
var SchoolIDCard = require('./SchoolIDCard-dddb3b1d.js');
var SkillTabCard = require('./SkillTabCard-efade17a.js');
var SkillVerticalCard = require('./SkillVerticalCard-62e308b4.js');
var SkillsCard = require('./SkillsCard-dae73a71.js');
var SkillsStatsCard = require('./SkillsStatsCard-aeef796c.js');
var SmallAchievementCard = require('./SmallAchievementCard-d22a4d25.js');
var UserProfilePicture = require('./UserProfilePicture-d69fe4f0.js');
var VCCard = require('./VCCard-7473b581.js');
var VCDisplayBackFace = require('./VCDisplayBackFace-a05e4046.js');
var VCDisplayCard = require('./VCDisplayCard-3346d2f9.js');
var VCDisplayCard2 = require('./VCDisplayCard2-d713808f.js');
var VCThumbnail = require('./VCThumbnail-f84d0d01.js');
var VCVerificationCheck = require('./VCVerificationCheck-92198135.js');
var VCVerificationPill = require('./VCVerificationPill-08b37c5d.js');
var IDDisplayIcon = require('./IDDisplayIcon-4b6ce62f.js');
var QRCodeIcon = require('./QRCodeIcon-3021a53b.js');
var User = require('./User-54049eba.js');
var Checkmark = require('./Checkmark-74444a78.js');
var Coins = require('./Coins-1f33b7ad.js');
var GenericArrow = require('./GenericArrow-5c392276.js');
var Lightbulb = require('./Lightbulb-82cec354.js');
var ThreeDotVertical = require('./ThreeDotVertical-dda0e747.js');
var Trophy = require('./Trophy-9758f0cf.js');
require('./index-ba659c28.js');
require('./walletcurrency.webp');
require('./id-purple.png');
require('./backpack.png');
require('./walletskills.webp');
require('./walletTrophy.png');
require('./social-badge-2.png');
require('./experience-mountain.png');
require('./goals-target.png');
require('./apple.png');
require('./relationships-cats.png');
require('./membership-key.svg');
require('./Accommodation-Hands.png');
require('./eventsGraphic.png');
require('./minitrophycolored.svg');
require('./minigradcapcolored.svg');
require('./minipuzzlecolored.svg');
require('./index-5488badc.js');
require('./PuzzlePiece-e64f4596.js');
require('./credential.helpers-f060ee96.js');
require('./index-0cac2c5b.js');
require('./types.esm-4a1c2fcd.js');
require('./CaretRightFilled.svg');
require('./addawardlight.svg');
require('./DotsThreeOutline.svg');
require('./athletics.png');
require('./business.png');
require('./creative.png');
require('./digital.png');
require('./durable.png');
require('./medical.png');
require('./social.png');
require('./stem.png');
require('./trade.png');
require('./icons-857d4be1.js');
require('./coins.svg');
require('./user.svg');
require('./trophy.svg');
require('./briefcase.svg');
require('./graduation.svg');
require('./lightbulb.svg');
require('./award.svg');
require('./key-icon.svg');
require('./minipuzzle.svg');
require('./minitrophy.svg');
require('./gradcaplight.svg');
require('./idIcon.svg');
require('./coursesIcon.svg');
require('./socialBadgesIcon.svg');
require('./achievementsIcon.svg');
require('./accomplishmentsIcon.svg');
require('./skillsIcon.svg');
require('./experiencesIcon.svg');
require('./relationshipsIcon.svg');
require('./accommodationsIcon.svg');
require('./membershipsIcon.svg');
require('./goalsIcon.svg');
require('./eventsIcon.svg');
require('./lhplaceholder.png');
require('./minijob.svg');
require('./contactless-symbol.svg');
require('./index-ec1d26f1.js');
require('./card-chip.svg');
require('./master-card-logo.svg');
require('react-dom');
require('./verified-check.png');
require('./notifications-56c6fc94.js');
require('./X.svg');
require('./ArrowArcLeft.svg');
require('./walletids.webp');
require('./membership-graphic.png');
require('./index-838fa72c.js');
require('./skillplaceholder.png');
require('./skillgraph.svg');
require('@learncard/init');
require('./ArrowArcRight.svg');
require('./icon.green.fat-arrow.png');
require('./id-sleeve.png');
require('./vc.check.svg');
require('./RedXCircle.svg');
require('./GreenCheckCircle.svg');
require('./YellowWarningCircle.svg');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const useOnMomentumScrollEnd = ({
  onScroll: _onScroll,
  onMomentumScrollEnd,
  debounceTime = 305
}) => {
  const momentumScrollEndTimer = React.useRef();
  React.useEffect(() => () => clearTimeout(momentumScrollEndTimer.current), []);
  const onScroll = (e) => {
    _onScroll == null ? void 0 : _onScroll(e);
    clearTimeout(momentumScrollEndTimer.current);
    momentumScrollEndTimer.current = setTimeout(() => {
      onMomentumScrollEnd(e);
    }, debounceTime);
  };
  return onScroll;
};

const useScrollBorders = ({
  ref,
  topShowClassName = "border-t border-t-[--color-grayscale-line]",
  topHideClassName = "border-t border-t-transparent",
  bottomShowClassName = "border-b border-b-[--color-grayscale-line]",
  bottomHideClassName = "border-b border-b-transparent"
} = {}) => {
  const internalRef = ref != null ? ref : React__default["default"].createRef();
  const updateBorderClasses = () => {
    if (!internalRef.current || internalRef.current.scrollHeight <= internalRef.current.clientHeight)
      return;
    if (internalRef.current.scrollTop > 0) {
      internalRef.current.classList.remove(...topHideClassName.split(" "));
      internalRef.current.classList.add(...topShowClassName.split(" "));
    } else {
      internalRef.current.classList.remove(...topShowClassName.split(" "));
      internalRef.current.classList.add(...topHideClassName.split(" "));
    }
    if (internalRef.current.scrollTop < internalRef.current.scrollHeight - internalRef.current.clientHeight) {
      internalRef.current.classList.remove(...bottomHideClassName.split(" "));
      internalRef.current.classList.add(...bottomShowClassName.split(" "));
    } else {
      internalRef.current.classList.remove(...bottomShowClassName.split(" "));
      internalRef.current.classList.add(...bottomHideClassName.split(" "));
    }
  };
  React.useEffect(() => {
    const element = internalRef.current;
    if (element) {
      updateBorderClasses();
      element.addEventListener("scroll", updateBorderClasses);
      return () => element.removeEventListener("scroll", updateBorderClasses);
    }
  }, [internalRef]);
  return internalRef;
};

exports.AchievementCard = AchievementCard.AchievementCard;
exports.BoostGenericCard = BoostGenericCard.BoostGenericCard;
exports.BoostSmallCard = BoostSmallCard.BoostSmallCard;
exports.Button = Button.Button;
exports.CertDisplayCardSkillsCount = CertificateDisplayCard.CertDisplayCardSkillsCount;
exports.CertificateBackFace = CertificateDisplayCard.CertificateBackFace;
exports.CertificateDisplayCard = CertificateDisplayCard.CertificateDisplayCard;
exports.CertificateFrontFace = CertificateDisplayCard.CertificateFrontFace;
exports.SelectedSkills = VerifierStateBadgeAndText.SelectedSkills;
exports.VERIFIER_STATES = VerifierStateBadgeAndText.VERIFIER_STATES;
exports.VerifierStateBadgeAndText = VerifierStateBadgeAndText.VerifierStateBadgeAndText;
exports.CircleCheckButton = CircleCheckButton.CircleCheckButton;
exports.CircleIcon = CircleIcon.CircleIcon;
exports.CountCircle = CircleIcon.CountCircle;
exports.CourseCard = CourseCard.CourseCard;
exports.CourseVerticalCard = CourseVerticalCard.CourseVerticalCard;
exports.FlippyCard = FlippyCard.FlippyCard;
exports.GenericCard = GenericCard.GenericCard;
exports.JobHistoryCard = JobHistoryCard.JobHistoryCard;
exports.JobListCard = JobListCard.JobListCard;
exports.JobListingBubble = JobListCard.JobListingBubble;
exports.LearnCardCreditCardBackFace = LearnCardCreditCardBackFace.LearnCardCreditCardBackFace;
exports.LearnCardCreditCardFrontFace = LearnCardCreditCardFrontFace.LearnCardCreditCardFrontFace;
exports.LearnPill = LearnPill.LearnPill;
exports.Lightbox = Lightbox.Lightbox;
exports.CircleLoadingState = CircleSpinner.CircleLoadingState;
exports.MeritBadgeBackFace = MeritBadgeDisplayCard.MeritBadgeBackFace;
exports.MeritBadgeDisplayCard = MeritBadgeDisplayCard.MeritBadgeDisplayCard;
exports.MeritBadgeFrontFace = MeritBadgeDisplayCard.MeritBadgeFrontFace;
exports.MeritBadgeSkillsCount = MeritBadgeSkillsCount.MeritBadgeSkillsCount;
exports.MiniVCThumbnail = MiniVCThumbnail.MiniVCThumbnail;
exports.Notification = Notification.Notification;
exports.NotificationTypeStyles = types.NotificationTypeStyles;
exports.NotificationBoostCard = NotificationBoostCard.NotificationBoostCard;
exports.NotificationUserAcceptedBoostCard = NotificationUserAcceptedBoostCard.NotificationUserAcceptedBoostCard;
exports.NotificationUserCard = NotificationUserCard.NotificationUserCard;
exports.UserNotificationTypeStyles = types$1.UserNotificationTypeStyles;
exports.QRCodeCard = QRCodeCard.QRCodeCard;
exports.CheckmarkSvg = RoundedPill.CheckmarkSvg;
exports.RoundedPill = RoundedPill.RoundedPill;
exports.RoundedSquare = constants.RoundedSquare;
exports.TYPE_TO_IMG_SRC = constants.TYPE_TO_IMG_SRC;
exports.TYPE_TO_MINI_ICON = constants.TYPE_TO_MINI_ICON;
exports.TYPE_TO_WALLET_COLOR = constants.TYPE_TO_WALLET_COLOR;
exports.WALLET_SUBTYPES = constants.WALLET_SUBTYPES;
exports.SchoolIDCard = SchoolIDCard.SchoolIDCard;
exports.SkillTabCard = SkillTabCard.SkillTabCard;
exports.SkillVerticalCard = SkillVerticalCard.SkillVerticalCard;
exports.SkillsCard = SkillsCard.SkillsCard;
exports.SkillsMeterSegment = SkillsCard.SkillsMeterSegment;
exports.SkillsStatsCard = SkillsStatsCard.SkillsStatsCard;
exports.SmallAchievementCard = SmallAchievementCard.SmallAchievementCard;
exports.UserProfilePicture = UserProfilePicture.UserProfilePicture;
exports.VCCard = VCCard.VCCard;
exports.VCDisplayBackFace = VCDisplayBackFace.VCDisplayBackFace;
exports.VCDisplayCard = VCDisplayCard.VCDisplayCard;
exports.VCDisplayCard2 = VCDisplayCard2.VCDisplayCard2;
exports.VCDisplayCardSkillsCount = VCDisplayCard2.VCDisplayCardSkillsCount;
exports.VCIDDisplayCard = VCDisplayCard2.VCIDDisplayCard;
exports.VCThumbnail = VCThumbnail.VCThumbnail;
exports.VCVerificationCheck = VCVerificationCheck.VCVerificationCheck;
exports.VCVerificationCheckWithSpinner = VCVerificationCheck.VCVerificationCheckWithSpinner;
exports.VCVerificationCheckWithText = VCVerificationCheck.VCVerificationCheckWithText;
exports.ValidationStateIndicator = VCVerificationPill.ValidationStateIndicator;
exports.AwardDisplayIcon = IDDisplayIcon.AwardDisplayIcon;
exports.BadgeDisplayIcon = IDDisplayIcon.BadgeDisplayIcon;
exports.CertificateDisplayIcon = IDDisplayIcon.CertificateDisplayIcon;
exports.CourseDisplayIcon = IDDisplayIcon.CourseDisplayIcon;
exports.IDDisplayIcon = IDDisplayIcon.IDDisplayIcon;
exports.AwardRibbon = QRCodeIcon.AwardRibbon;
exports.IDIcon = QRCodeIcon.IDIcon;
exports.QRCodeIcon = QRCodeIcon.QRCodeIcon;
exports.Briefcase = User.Briefcase;
exports.Graduation = User.Graduation;
exports.User = User.User;
exports.Checkmark = Checkmark.Checkmark;
exports.Coins = Coins.Coins;
exports.GenericArrow = GenericArrow.GenericArrow;
exports.IDSleeve = Lightbulb.IDSleeve;
exports.Lightbulb = Lightbulb.Lightbulb;
exports.ThreeDotVertical = ThreeDotVertical.ThreeDotVertical;
exports.Trophy = Trophy.Trophy;
exports.useOnMomentumScrollEnd = useOnMomentumScrollEnd;
exports.useScrollBorders = useScrollBorders;
//# sourceMappingURL=index.js.map
