"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _styledComponents = _interopRequireWildcard(require("styled-components"));

var _designSystem = require("../design-system");

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const GlobalStyle = (0, _styledComponents.createGlobalStyle)`
  html, body, #app {
    width: 100%;
    height: 100%;
  }
`;
const Wrapper = (0, _styledComponents.default)(_designSystem.Box).withConfig({
  displayName: "login__Wrapper",
  componentId: "sc-1um38e4-0"
})(["align-items:center;justify-content:center;flex-direction:column;height:100%;"]);

const Login = props => {
  const {
    action,
    message
  } = props;
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(GlobalStyle, null), _react.default.createElement(Wrapper, {
    flex: true,
    variant: "grey"
  }, _react.default.createElement(_designSystem.Box, {
    variant: "white",
    width: "500px",
    height: "400px"
  }, _react.default.createElement(_designSystem.H3, null, "Please login to proceed to the admin panel"), message && _react.default.createElement(_designSystem.Box, {
    my: "lg"
  }, message), _react.default.createElement(_designSystem.Box, {
    as: "form",
    action: action,
    method: "POST"
  }, _react.default.createElement(_designSystem.FormGroup, null, _react.default.createElement(_designSystem.Label, null, "Email"), _react.default.createElement(_designSystem.Input, {
    name: "email",
    placeholder: "Your Email Address"
  })), _react.default.createElement(_designSystem.FormGroup, null, _react.default.createElement(_designSystem.Label, null, "Email"), _react.default.createElement(_designSystem.Input, {
    type: "password",
    name: "password",
    placeholder: "Password",
    autoComplete: "new-password"
  })), _react.default.createElement(_designSystem.Box, {
    mt: "xl"
  }, _react.default.createElement(_designSystem.Button, {
    variant: "primary"
  }, "Login"))))));
};

var _default = Login;
exports.default = _default;