'use strict';

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

var index = require('./index-1e5e2223.js');
var index$1 = require('./index-a11c6c43.js');
var index$2 = require('./index-a31ed3e1.js');
var index$3 = require('./index-3d563586.js');
var index$4 = require('./index-87ed9c3a.js');
var index$5 = require('./index-97e6dd59.js');
var index$6 = require('./index-16480bf7.js');
var tslib_es6 = require('./tslib.es6-2c2ed574.js');
var React = require('react');
var core = require('@mantine/core');
var miscTheme = require('./miscTheme.js');
var index$7 = require('./index-50fc9ea2.js');
var hooks = require('@mantine/hooks');
var index$8 = require('./index-acf80f95.js');
var index$9 = require('./index-29a7579d.js');
var index$a = require('./index-59a9827e.js');
var index$b = require('./index-024542ed.js');
var index$c = require('./index-eba09ec0.js');
require('@hhgtech/icons/other');
require('./index-b0ce6f8f.js');
require('./constantsDomainLocales.js');
require('./Locale-fbe01177.js');
require('./constantsIsProduction.js');
require('./index-af9c3c64.js');
require('./utils-b92a8b1c.js');
require('@emotion/styled');
require('@mantine/carousel');
require('./shared-60ad3e5a.js');
require('classnames');
require('uuid');
require('./useUniqueId-18ea5b53.js');
require('./constantsSite.js');
require('./index-da3b86cd.js');
require('@emotion/react');
require('@hhgtech/icons/core');
require('@mantine/dates');
require('./index-6ce6e395.js');
require('date-fns/locale');
require('./constantsRiskScreener.js');
require('./index.styles-691de58f.js');
require('./index-3643ff1b.js');
require('./translationsContext-78113889.js');
require('dayjs');
require('@mantine/notifications');

function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }

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

const Badge = (_a) => {
    var { color = miscTheme.theme.colors.primaryBase, styles } = _a, rest = tslib_es6.__rest(_a, ["color", "styles"]);
    return (React__default["default"].createElement(core.Badge, Object.assign({ variant: "filled", color: color, styles: Object.assign({ root: {
                borderRadius: '2px',
                background: color,
                textTransform: 'unset',
            } }, styles) }, rest)));
};

function useLockBodyScroll(visible = false) {
    React__default["default"].useEffect(() => {
        if (visible) {
            const originalStyle = window.getComputedStyle(document.body).overflow;
            document.body.style.overflow = 'hidden';
            return () => {
                document.body.style.overflow = originalStyle;
            };
        }
    }, [visible]);
}

const LoadingOverlay = (props) => {
    useLockBodyScroll(props.visible);
    return (React__default["default"].createElement(core.LoadingOverlay, Object.assign({ loaderProps: {
            color: miscTheme.theme.colors.primaryBase,
        } }, props)));
};

const Slider = (_a) => {
    var { color, withControl, onChange, value, min, max, isStatic, containerClassName, containerStyle } = _a, props = tslib_es6.__rest(_a, ["color", "withControl", "onChange", "value", "min", "max", "isStatic", "containerClassName", "containerStyle"]);
    const [currentValue, setCurrentValue] = React.useState(value || min || 0);
    const [debounced] = hooks.useDebouncedValue(currentValue, index.DEBOUNCED_TIME);
    const increase = () => {
        setCurrentValue((p) => (max && p === max ? p : p + 1));
    };
    const decrease = () => {
        setCurrentValue((p) => (min && p === min ? p : p - 1));
    };
    React.useEffect(() => {
        onChange === null || onChange === void 0 ? void 0 : onChange(debounced);
    }, [debounced]);
    React.useEffect(() => {
        setCurrentValue(value);
    }, [value]);
    return (React__default["default"].createElement(index.StyledSliderWrapper, { className: containerClassName, style: containerStyle },
        withControl && (React__default["default"].createElement(index$3.Button, { type: "button", size: "sm", variant: "ghost", onClick: decrease },
            React__default["default"].createElement("svg", { width: "10", height: "10", fill: "none", viewBox: "0 0 12 3" },
                React__default["default"].createElement("path", { d: "M1 1.004h8", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })))),
        React__default["default"].createElement(index.StyledSlider, Object.assign({ thumbSize: 21, labelAlwaysOn: true, radius: "xl", color: color, value: currentValue, onChange: !isStatic ? setCurrentValue : () => null, min: min, max: max }, props, { className: 'hhg-mantine-slider ' + (props.className || '') })),
        withControl && (React__default["default"].createElement(index$3.Button, { type: "button", size: "sm", variant: "ghost", onClick: increase },
            React__default["default"].createElement("svg", { width: "16", height: "20", fill: "none", viewBox: "0 0 16 16" },
                React__default["default"].createElement("path", { d: "M8 4v8M4 8h8", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }))))));
};

var styles = {"container":"MON6sfi","iconContainer":"pS-tJD7","icon":"s3tJ9-5","title":"fNsZr1b","description":"uuxV74v","button":"YohjTDU"};

function Result(props) {
    const { icon, title, description, button, buttonProps, style, className } = props;
    const _a = buttonProps || {}, { size = 'lg', variant = 'outline' } = _a, restButtonProps = tslib_es6.__rest(_a, ["size", "variant"]);
    const Icon = icon;
    return (React__default["default"].createElement("div", { className: core.clsx('result', styles.container, className), style: style },
        Icon && (React__default["default"].createElement("div", { className: core.clsx('resultIconContainer', styles.iconContainer) },
            React__default["default"].createElement(Icon, { className: core.clsx('resultIcon', styles.icon) }))),
        React__default["default"].createElement(core.Title, { order: 3, size: "h3", className: core.clsx('resultTitle', styles.title) }, title),
        React__default["default"].createElement(core.Text, { className: core.clsx('resultDescription', styles.description) }, description),
        button && (React__default["default"].createElement(core.Button, Object.assign({}, restButtonProps, { size: size, variant: variant, className: core.clsx('resultButton', styles.button, restButtonProps.className) }), button))));
}

exports.Accordion = index.Accordion;
exports.Anchor = index.Anchor;
exports.AspectRatio = index.AspectRatio;
exports.Avatar = index.Avatar;
exports.Breadcrumbs = index.Breadcrumbs;
exports.Carousel = index.Carousel;
exports.CentralCarousel = index.CentralCarousel;
exports.Checkbox = index.Checkbox;
exports.ChipButton = index.ChipButton;
exports.ErrorLabel = index.ErrorLabel;
exports.Input = index.Input;
exports.OTP = index.OTP;
exports.Phone = index.Phone;
exports.PhoneInput = index.PhoneInput;
exports.Popover = index.Popover;
exports.Radio = index.Radio;
exports.Select = index.Select;
exports.emotionCache = index.emotionCache;
exports.DatePicker = index$1.DatePicker;
exports.Text = index$2.Text;
exports.Button = index$3.Button;
exports.Indicator = index$4.Indicator;
exports.TextArea = index$5.TextArea;
exports.Modal = index$6.Modal;
exports.Spoiler = index$7.Spoiler;
exports.Switch = index$8.Switch;
exports.MantineProvider = index$9.MantineProvider;
Object.defineProperty(exports, 'CustomStylesType', {
  enumerable: true,
  get: function () { return index$a.CustomStylesType; }
});
Object.defineProperty(exports, 'FontWeight', {
  enumerable: true,
  get: function () { return index$a.FontWeight; }
});
exports.TemplateProvider = index$a.TemplateProvider;
exports.MAPPED_LOCALE = index$b.MAPPED_LOCALE;
exports.getHeadingStyles = index$b.getHeadingStyles;
exports.getMantineThemeOverride = index$b.getMantineThemeOverride;
exports.showNotification = index$b.showNotification;
exports.themeColors = index$b.themeColors;
exports.useMantineLocale = index$b.useMantineLocale;
exports.Tabs = index$c.Tabs;
exports.Badge = Badge;
exports.LoadingOverlay = LoadingOverlay;
exports.Result = Result;
exports.Slider = Slider;
