var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/pro/Login2.0/shared/OAuthButtons.tsx
var OAuthButtons_exports = {};
__export(OAuthButtons_exports, {
  default: () => OAuthButtons_default
});
module.exports = __toCommonJS(OAuthButtons_exports);
var import_react = __toESM(require("react"));
var import_materials = require("@pisell/materials");
var import_icons = require("@ant-design/icons");
var OAuthButtons = ({ oauth, onOAuthLogin }) => {
  var _a, _b, _c;
  const oauthMethods = [];
  if ((_a = oauth == null ? void 0 : oauth.google) == null ? void 0 : _a.enabled) {
    oauthMethods.push({
      key: "google",
      icon: /* @__PURE__ */ import_react.default.createElement(import_icons.GoogleOutlined, null),
      text: "Continue with Google"
    });
  }
  if ((_b = oauth == null ? void 0 : oauth.facebook) == null ? void 0 : _b.enabled) {
    oauthMethods.push({
      key: "facebook",
      icon: /* @__PURE__ */ import_react.default.createElement(import_icons.FacebookOutlined, null),
      text: "Continue with Facebook"
    });
  }
  if ((_c = oauth == null ? void 0 : oauth.apple) == null ? void 0 : _c.enabled) {
    oauthMethods.push({
      key: "apple",
      icon: /* @__PURE__ */ import_react.default.createElement(import_icons.AppleOutlined, null),
      text: "Continue with Apple"
    });
  }
  if (oauthMethods.length === 0) {
    return null;
  }
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "oauth-section" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "divider" }, /* @__PURE__ */ import_react.default.createElement("span", null, "OR")), /* @__PURE__ */ import_react.default.createElement(import_materials.Space, { direction: "vertical", size: 12, style: { width: "100%" } }, oauthMethods.map((method) => /* @__PURE__ */ import_react.default.createElement(
    import_materials.Button,
    {
      key: method.key,
      size: "large",
      block: true,
      icon: method.icon,
      onClick: () => onOAuthLogin == null ? void 0 : onOAuthLogin(method.key),
      className: `oauth-button ${method.key}`
    },
    method.text
  ))));
};
var OAuthButtons_default = OAuthButtons;
