import { h } from "@stencil/core";
import { BaseRegistrationFormView, } from "./sqm-base-registration-form-view";
export default {
  title: "Components/Microsite Base Registration",
};
const defaultProps = {
  states: {
    validationErrors: {},
  },
  callbacks: {
    handleEmailSubmit: () => console.log("Submit!"),
  },
  content: {
    pageLabel: "Register",
    requiredFieldErrorMessage: "Cannot be empty",
    invalidEmailErrorMessage: "Must be a valid email address",
    googleButton: h("sl-button", null, "Register with Google"),
    secondaryButton: (h("span", null,
      "Already have an account?",
      " ",
      h("sl-button", { padding: "0", style: { width: "60px" }, size: "large", type: "text" }, "Sign in"),
      " ")),
  },
};
const errorProps = {
  ...defaultProps,
  states: {
    validationErrors: { error: "Something went wrong. Please try again." },
  },
};
export const Default = () => {
  return h(BaseRegistrationFormView, Object.assign({}, defaultProps));
};
export const EmailError = () => {
  return h(BaseRegistrationFormView, Object.assign({}, errorProps));
};
