import React from "react";
import { Button } from "@pisell/materials";
import classNames from "classnames";
//#region src/pro/Login2.0/components/OAuthButtonGroup.tsx
const OAuthButtonGroup = ({ providers, layout = "vertical", size = "large", block = true, wrapperClassName, buttonClassName, gap = 12 }) => {
	if (!providers.length) return null;
	const isVertical = layout === "vertical";
	return /* @__PURE__ */ React.createElement("div", {
		className: classNames("oauth-button-group", wrapperClassName, {
			"oauth-button-group-vertical": isVertical,
			"oauth-button-group-horizontal": !isVertical
		}),
		style: isVertical ? {
			display: "grid",
			rowGap: gap
		} : {
			display: "flex",
			columnGap: gap,
			flexWrap: "wrap"
		}
	}, providers.map(({ key, label, icon, onClick, disabled, className, badge, badgeClassName }) => /* @__PURE__ */ React.createElement(Button, {
		key,
		size,
		block,
		disabled,
		className: classNames(buttonClassName, className),
		icon,
		onClick
	}, badge && /* @__PURE__ */ React.createElement("span", { className: classNames("oauth-button-badge", badgeClassName) }, badge), label)));
};
//#endregion
export { OAuthButtonGroup as default };
