import { h } from "@stencil/core";
import { PortalLoginView } from "./sqm-portal-login-view";
export default {
  title: "Components/Microsite Login",
};
const defaultProps = {
  states: {
    error: "",
    loading: false,
    forgotPasswordPath: "/forgotPassword",
    registerPath: "/register",
  },
  callbacks: {
    googleSubmit: async () => { },
    submit: async (e) => await e,
  },
  content: {
    pageLabel: "Sign in to your account",
  },
};
const errorProps = {
  states: {
    error: "Something went wrong. Please try again.",
    loading: false,
    forgotPasswordPath: "/forgotPassword",
    registerPath: "/register",
  },
  callbacks: {
    googleSubmit: async () => { },
    submit: async (e) => await e,
  },
  content: {
    pageLabel: "Sign in to your account",
  },
};
const loadingProps = {
  states: {
    error: "",
    loading: true,
    forgotPasswordPath: "/forgotPassword",
    registerPath: "/register",
  },
  callbacks: {
    googleSubmit: async () => { },
    submit: async (e) => await e,
  },
  content: {
    pageLabel: "Sign in to your account",
  },
};
const googleProps = {
  ...defaultProps,
  content: {
    secondaryButton: (h("span", null,
      "Don't have an account?",
      " ",
      h("sl-button", { style: { width: "50px" }, size: "large", type: "text" }, "Register"))),
    googleButton: h("sl-button", null, "Sign in with Google"),
  },
};
export const Default = () => (h("sqm-portal-login", { demoData: { ...defaultProps } }));
export const Text = () => h(PortalLoginView, Object.assign({}, defaultProps));
export const IsGoogle = () => (h("sqm-portal-login", { demoData: { ...googleProps } }));
export const LoginWithError = () => (h("sqm-portal-login", { demoData: { ...errorProps } }));
export const LoginLoading = () => (h("sqm-portal-login", { demoData: { ...loadingProps } }));
