import React, { forwardRef } from "react";
import { Action } from "./Action.js";
import { StyledEqualActions } from "./EqualActions.styled.js";
const EqualActions = forwardRef((props, ref) => {
    React.Children.forEach(props.children, (child) => {
        if (!child || typeof child !== "object" || !("type" in child) || child.type !== Action) {
            throw new TypeError("Every child of EqualActions must be an Action component");
        }
    });
    const style = {
        "--actions-count": React.Children.count(props.children),
    };
    const isVertical = props.mode === "vertical";
    return (React.createElement(StyledEqualActions, { className: props.className, vertical: isVertical, css: style, ref: ref }, props.children));
});
EqualActions.displayName = "EqualActions";
EqualActions.toString = () => StyledEqualActions.toString();
export { EqualActions };
//# sourceMappingURL=EqualActions.js.map