import { h } from "@stencil/core";
import { PortalForgotPasswordView, } from "./sqm-portal-forgot-password-view";
import scenario from "./sqm-portal-forgot-password.feature";
export default {
  title: "Components/Microsite Forgot Password",
  parameters: {
    scenario,
  },
};
const defaultProps = {
  states: {
    error: "",
    loading: false,
    success: false,
    loginPath: "/login",
  },
  callbacks: {
    submit: async (e) => await e,
  },
  content: {
    loginText: "Login",
    messageSlot: "Enter your email below to receive a password reset link.",
  },
};
const errorProps = {
  states: {
    error: "Something went wrong. Please try again.",
    loading: false,
    success: false,
    loginPath: "/login",
  },
  callbacks: {
    submit: async (e) => await e,
  },
  content: {
    messageSlot: "Enter your email below to receive a password reset link.",
    loginText: "Login",
  },
};
const loadingProps = {
  states: {
    error: "",
    loading: true,
    success: false,
    loginPath: "/login",
  },
  callbacks: {
    submit: async (e) => await e,
  },
  content: {
    loginText: "Login",
    messageSlot: "Enter your email below to receive a password reset link.",
  },
};
const successProps = {
  states: {
    error: "",
    loading: false,
    success: true,
    loginPath: "/login",
  },
  callbacks: {
    submit: async (e) => await e,
  },
  content: {
    loginText: "Login",
    messageSlot: "Enter your email below to receive a password reset link.",
    successAlertText: "An email has been sent with instructions to reset your password.",
  },
};
export const Default = () => h(PortalForgotPasswordView, Object.assign({}, defaultProps));
export const DemoDataTest = () => (h("sqm-portal-forgot-password", null));
export const ForgotPasswordWithError = () => (h(PortalForgotPasswordView, Object.assign({}, errorProps)));
export const ForgotPasswordLoading = () => (h(PortalForgotPasswordView, Object.assign({}, loadingProps)));
export const ForgotPasswordSuccess = () => (h(PortalForgotPasswordView, Object.assign({}, successProps)));
