/* index.tsx generated by @compiled/babel-plugin v0.40.0 */
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
import { renderChildren } from '../utils';
const alignmentStyleMap = {
  right: "_1dthh9n0 _r291h9n0 _1bahesu3 _y3gnusic",
  left: "_1dthv2br _r291v2br _1bah1y6m _y3gn1e5h"
};
const baseStyleBySize = {
  xlarge: "_zulpv47k _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
  large: "_zulppxbi _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
  medium: "_zulpu2gc _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
  small: "_zulp1b66 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf"
};
const baseStyleByDirection = {
  horizontal: "_2lx2vrvc _4cvr1h6o",
  vertical: "_2lx21bp4 _4cvr1y6m"
};
const baseStyles = null;
const widthStyle = {
  flexible: "_16jlkb7n _1o9z11wp _i0dlf1ug",
  'fit-to-content': ""
};
const positionStyle = {
  top: "_1wpz1y6m",
  center: ""
};
const horizontalStyleBase = null;
const horizontalStyleByHeight = {
  xlarge: "_1e0ccj1k _102k125z",
  large: "_1e0ccj1k _102k125z",
  medium: "_1e0ccj1k _102kz42d",
  small: "_1e0ccj1k _102kz42d"
};
const gapStylesLeft = {
  xlarge: "_7yhbv47k _m6ukidpf",
  large: "_7yhbpxbi _m6ukidpf",
  medium: "_7yhbu2gc _m6ukidpf",
  small: "_7yhb1b66 _m6ukidpf"
};
const gapStylesRight = {
  xlarge: "_24rcv47k _3dveidpf",
  large: "_24rcpxbi _3dveidpf",
  medium: "_24rcu2gc _3dveidpf",
  small: "_24rc1b66 _3dveidpf"
};
const minWidthStyle = null;

/**
 * Creates a group of Action components. Accepts an array of Actions, in addition to some styling
 * preferences.
 * @internal
 * @param {ActionGroupProps} ActionGroupProps
 * @see Action
 */
const ElementGroup = ({
  align = SmartLinkAlignment.Left,
  children,
  direction = SmartLinkDirection.Horizontal,
  size = SmartLinkSize.Medium,
  testId = 'smart-element-group',
  width = SmartLinkWidth.FitToContent,
  position = SmartLinkPosition.Center,
  className
}) => {
  const isHorizontal = direction === SmartLinkDirection.Horizontal;
  return /*#__PURE__*/React.createElement("div", {
    "data-smart-element-group": true,
    "data-testid": testId
    // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
    ,
    className: ax([baseStyleBySize[size], baseStyleByDirection[direction], "_fiawglyw", alignmentStyleMap[align], "_1ul99by0", widthStyle[width], isHorizontal && "_1reo15vq _18m915vq _1e0c1ule _s7n4nkob _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _1aaynkob _15tynkob _1iu61nu9 _166k1nu9 _1div1nu9 _bmfb1nu9", isHorizontal && horizontalStyleByHeight[size], isHorizontal && align === SmartLinkAlignment.Left && gapStylesLeft[size], isHorizontal && align === SmartLinkAlignment.Right && gapStylesRight[size], positionStyle[position], className])
  }, renderChildren(children, size));
};
export default ElementGroup;