;
{
  try {
    let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
    n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bdb4b0fc-bebd-4335-ad73-7310b6eb296e", e._sentryDebugIdIdentifier = "sentry-dbid-bdb4b0fc-bebd-4335-ad73-7310b6eb296e");
  } catch (e) {
  }
}
;
import { jsx } from "preact/jsx-runtime";
import cx from "classnames";
import { toChildArray, Fragment } from "preact";
const stackLayout = "adyen-kyc-stack-layout";
const stackLayoutGapXs = "adyen-kyc-stack-layout-gap-xs";
const stackLayoutGapS = "adyen-kyc-stack-layout-gap-s";
const stackLayoutGapM = "adyen-kyc-stack-layout-gap-m";
const stackLayoutGapL = "adyen-kyc-stack-layout-gap-l";
const stackLayoutGapXl = "adyen-kyc-stack-layout-gap-xl";
const stackLayoutLeft = "adyen-kyc-stack-layout-left";
const stackLayoutCenter = "adyen-kyc-stack-layout-center";
const stackLayoutRight = "adyen-kyc-stack-layout-right";
const stackLayoutItem = "adyen-kyc-stack-layout-item";
const stackLayoutHorizontal = "adyen-kyc-stack-layout-horizontal";
const stackLayoutLeftHorizontal = "adyen-kyc-stack-layout-left-horizontal";
const stackLayoutCenterHorizontal = "adyen-kyc-stack-layout-center-horizontal";
const stackLayoutRightHorizontal = "adyen-kyc-stack-layout-right-horizontal";
const styles = {
  stackLayout,
  stackLayoutGapXs,
  stackLayoutGapS,
  stackLayoutGapM,
  stackLayoutGapL,
  stackLayoutGapXl,
  stackLayoutLeft,
  stackLayoutCenter,
  stackLayoutRight,
  stackLayoutItem,
  stackLayoutHorizontal,
  stackLayoutLeftHorizontal,
  stackLayoutCenterHorizontal,
  stackLayoutRightHorizontal
};
const gapStyles = {
  xSmall: styles.stackLayoutGapXs,
  small: styles.stackLayoutGapS,
  medium: styles.stackLayoutGapM,
  large: styles.stackLayoutGapL,
  xLarge: styles.stackLayoutGapXl,
  none: null
};
const alignStyles = {
  left: styles.stackLayoutLeft,
  center: styles.stackLayoutCenter,
  right: styles.stackLayoutRight,
  auto: null
};
const horizontalAlignStyles = {
  left: styles.stackLayoutLeftHorizontal,
  center: styles.stackLayoutCenterHorizontal,
  right: styles.stackLayoutRightHorizontal,
  auto: null
};
const flattenChildren = (children) => {
  return toChildArray(children).flatMap((child) => {
    if (typeof child === "object" && child.type === Fragment) {
      return flattenChildren(child.props.children);
    }
    return child;
  });
};
const StackLayout = ({
  align = "auto",
  children,
  gap = "medium",
  horizontal = false
}) => {
  const flattenedChildren = flattenChildren(children);
  const rootClassname = cx(styles.stackLayout, gapStyles[gap], alignStyles[align], {
    [horizontalAlignStyles[align]]: horizontal,
    [styles.stackLayoutHorizontal]: horizontal
  });
  return /* @__PURE__ */ jsx("div", { className: rootClassname, children: flattenedChildren.map((item, i) => {
    if (align === "auto") {
      return /* @__PURE__ */ jsx("div", { className: styles.stackLayoutItem, children: item }, item.key ?? i);
    }
    return item;
  }) });
};
const UnincorporatedPartnershipMemberTypes = {
  SECONDARY_PARTNER: "secondaryPartner",
  OWNER: "uboThroughOwnership",
  CONTROLLING_PERSON: "uboThroughControl"
};
export {
  StackLayout as S,
  UnincorporatedPartnershipMemberTypes as U
};
