import { jsxs, jsx } from 'react/jsx-runtime';
import { chakra, Image } from '@chakra-ui/react';
import getProviderIcon from '../../../utils/getProviderIcon.js';

var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const disableStyle = {
  backgroundColor: "gray.100",
  borderColor: "gray.100",
  color: "gray.500",
  pointerEvents: "none"
};
const Auth0Button = (_a) => {
  var _b = _a, { provider, children } = _b, rest = __objRest(_b, ["provider", "children"]);
  return /* @__PURE__ */ jsxs(
    chakra.button,
    __spreadProps(__spreadValues({
      display: "flex",
      position: "relative",
      padding: "0px 8px 0px 52px",
      background: "white",
      alignItems: "center",
      width: "100%",
      fontSize: "16px",
      fontFamily: "inherit",
      fontWeight: "400",
      height: "52px",
      border: "1px solid #c9cace",
      borderRadius: "3px",
      color: "#1e212a",
      cursor: "pointer",
      outline: "0",
      _focus: {
        backgroundColor: "rgba(226,67,41, 0.15)",
        boxShadow: "0 0 0 4px rgba(0,123,173,.15)",
        outline: "none"
      },
      _hover: {
        boxShadow: "inset 0 0 0 150px rgba(0,0,0,.1)",
        _disabled: disableStyle
      },
      _disabled: disableStyle,
      transition: "box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out",
      type: "submit",
      "data-provider": provider,
      "data-action-button-secondary": "true"
    }, rest), {
      children: [
        /* @__PURE__ */ jsx(
          Image,
          {
            src: getProviderIcon(provider),
            alt: `${provider} logo`,
            "data-provider": provider,
            position: "absolute",
            left: "26px",
            top: "50%",
            height: "20px",
            width: "20px",
            transform: "translateX(-50%) translateY(-50%)"
          }
        ),
        /* @__PURE__ */ jsx(chakra.span, { textAlign: "left", children })
      ]
    })
  );
};

export { Auth0Button as default };
//# sourceMappingURL=Auth0Button.js.map
