/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
/* 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';
var alignmentStyleMap = {
  right: "_1dthh9n0 _r291h9n0 _1bahesu3 _y3gnusic",
  left: "_1dthv2br _r291v2br _1bah1y6m _y3gn1e5h"
};
var 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"
};
var baseStyleByDirection = {
  horizontal: "_2lx2vrvc _4cvr1h6o",
  vertical: "_2lx21bp4 _4cvr1y6m"
};
var baseStyles = null;
var widthStyle = {
  flexible: "_16jlkb7n _1o9z11wp _i0dlf1ug",
  'fit-to-content': ""
};
var positionStyle = {
  top: "_1wpz1y6m",
  center: ""
};
var horizontalStyleBase = null;
var horizontalStyleByHeight = {
  xlarge: "_1e0ccj1k _102k125z",
  large: "_1e0ccj1k _102k125z",
  medium: "_1e0ccj1k _102kz42d",
  small: "_1e0ccj1k _102kz42d"
};
var gapStylesLeft = {
  xlarge: "_7yhbv47k _m6ukidpf",
  large: "_7yhbpxbi _m6ukidpf",
  medium: "_7yhbu2gc _m6ukidpf",
  small: "_7yhb1b66 _m6ukidpf"
};
var gapStylesRight = {
  xlarge: "_24rcv47k _3dveidpf",
  large: "_24rcpxbi _3dveidpf",
  medium: "_24rcu2gc _3dveidpf",
  small: "_24rc1b66 _3dveidpf"
};
var 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
 */
var ElementGroup = function ElementGroup(_ref) {
  var _ref$align = _ref.align,
    align = _ref$align === void 0 ? SmartLinkAlignment.Left : _ref$align,
    children = _ref.children,
    _ref$direction = _ref.direction,
    direction = _ref$direction === void 0 ? SmartLinkDirection.Horizontal : _ref$direction,
    _ref$size = _ref.size,
    size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
    _ref$testId = _ref.testId,
    testId = _ref$testId === void 0 ? 'smart-element-group' : _ref$testId,
    _ref$width = _ref.width,
    width = _ref$width === void 0 ? SmartLinkWidth.FitToContent : _ref$width,
    _ref$position = _ref.position,
    position = _ref$position === void 0 ? SmartLinkPosition.Center : _ref$position,
    className = _ref.className;
  var 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;