/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { useEffect } from 'react';
import { SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
import { renderChildren } from '../utils';
var baseBlockStyles = null;
var highlightRemoveStyles = null;
var gapStyles = {
  xlarge: "_zulpv47k _1ljqv47k",
  large: "_zulppxbi _1ljqpxbi",
  medium: "_zulpu2gc _1ljqu2gc",
  small: "_zulp1b66 _1ljq1b66"
};
var directionStyles = {
  vertical: "_2lx21bp4 _4cvr1y6m",
  horizontal: "_2lx2vrvc _4cvr1h6o"
};

/**
 * A block represents a collection of elements and actions that are arranged
 * in a row. All elements and actions should be contained within a Block.
 * @internal
 * @param {ActionGroupProps} ActionGroupProps
 * @see Action
 */
var Block = function Block(_ref) {
  var 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-block' : _ref$testId,
    className = _ref.className,
    blockRef = _ref.blockRef,
    onRender = _ref.onRender,
    onTransitionEnd = _ref.onTransitionEnd,
    style = _ref.style,
    placeholderId = _ref.placeholderId;
  useEffect(function () {
    onRender && onRender();
  }, [onRender]);
  return /*#__PURE__*/React.createElement("div", {
    // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
    className: ax(["_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1uzp1mp2 _a6bx1l7x _e4i5bjq5 _1gu2dgkc _5b7tuxlv _17aedgkc", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], gapStyles[size], className]),
    "data-smart-block": true,
    "data-testid": testId,
    onTransitionEnd: onTransitionEnd,
    ref: blockRef
    // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
    ,
    style: style,
    "data-ssr-placeholder": placeholderId,
    "data-ssr-placeholder-replace": placeholderId
  }, renderChildren(children, size));
};
export default Block;