import { h } from "@stencil/core";
import { PortalProfileView, } from "./sqm-portal-profile-view";
export default {
  title: "Components/Microsite Profile",
};
const defaultProps = {
  states: {
    success: false,
    loading: false,
    submitDisabled: false,
    showCountry: true,
    user: {
      id: "01",
      accountId: "111100000",
      firstName: "Joe",
      lastName: "Smith",
      email: "jsmith@gmail.com",
      countryCode: "5000",
    },
    text: {
      firstnametext: "First Name",
      lastnametext: "Last Name",
      emailtext: "Email",
      countrytext: "Country",
      editProfileHeader: "Edit your profile",
      editProfileSubHeader: "Personal Information",
      submitChangeButtonText: "Submit Changes",
    },
    formState: {
      country: "Canada",
      firstName: "Joe",
      lastName: "Smith",
      errors: null,
      error: "",
    },
  },
  callbacks: {
    onSubmit: (e) => console.log(e),
    onChange: (e) => console.log(e),
  },
};
const noCountry = {
  states: {
    success: false,
    loading: false,
    submitDisabled: false,
    showCountry: false,
    user: {
      id: "01",
      accountId: "111100000",
      firstName: "Joe",
      lastName: "Smith",
      email: "jsmith@gmail.com",
      countryCode: "5000",
    },
    text: {
      firstnametext: "First Name",
      lastnametext: "Last Name",
      emailtext: "Email",
      countrytext: "Country",
      editProfileHeader: "Edit your profile",
      editProfileSubHeader: "Personal Information",
      submitChangeButtonText: "Submit Changes",
    },
    formState: {
      country: "Canada",
      firstName: "Joe",
      lastName: "Smith",
      errors: null,
      error: "",
    },
  },
  callbacks: {
    onSubmit: (e) => console.log(e),
    onChange: (e) => console.log(e),
  },
};
const loadingProps = {
  states: {
    success: false,
    loading: true,
    submitDisabled: false,
    showCountry: true,
    user: {
      id: "01",
      accountId: "111100000",
      firstName: "Joe",
      lastName: "Smith",
      email: "jsmith@gmail.com",
      countryCode: "5000",
    },
    text: {
      firstnametext: "First Name",
      lastnametext: "Last Name",
      emailtext: "Email",
      countrytext: "Country",
      editProfileHeader: "Edit your profile",
      editProfileSubHeader: "Personal Information",
      submitChangeButtonText: "Submit Changes",
    },
    formState: {
      country: "Canada",
      firstName: "Joe",
      lastName: "Smith",
      errors: null,
      error: "",
    },
  },
  callbacks: {
    onSubmit: (e) => console.log(e),
    onChange: (e) => console.log(e),
  },
};
const disabledProps = {
  states: {
    success: false,
    loading: false,
    submitDisabled: true,
    showCountry: true,
    user: {
      id: "01",
      accountId: "111100000",
      firstName: "Joe",
      lastName: "Smith",
      email: "jsmith@gmail.com",
      countryCode: "5000",
    },
    text: {
      firstnametext: "First Name",
      lastnametext: "Last Name",
      emailtext: "Email",
      countrytext: "Country",
      editProfileHeader: "Edit your profile",
      editProfileSubHeader: "Personal Information",
      submitChangeButtonText: "Submit Changes",
    },
    formState: {
      country: "Canada",
      firstName: "Joe",
      lastName: "Smith",
      errors: null,
      error: "",
    },
  },
  callbacks: {
    onSubmit: (e) => console.log(e),
    onChange: (e) => console.log(e),
  },
};
const errorProps = {
  states: {
    success: false,
    loading: false,
    submitDisabled: false,
    showCountry: true,
    user: {
      id: "01",
      accountId: "111100000",
      firstName: "Joe",
      lastName: "Smith",
      email: "jsmith@gmail.com",
      countryCode: "5000",
    },
    text: {
      firstnametext: "First Name",
      lastnametext: "Last Name",
      emailtext: "Email",
      countrytext: "Country",
      editProfileHeader: "Edit your profile",
      editProfileSubHeader: "Personal Information",
      submitChangeButtonText: "Submit Changes",
    },
    formState: {
      country: "Canada",
      firstName: "Joe",
      lastName: "Smith",
      errors: null,
      error: "Something went wrong. Please try again.",
    },
  },
  callbacks: {
    onSubmit: (e) => console.log(e),
    onChange: (e) => console.log(e),
  },
};
const successProps = {
  states: {
    success: true,
    loading: false,
    submitDisabled: false,
    showCountry: true,
    user: {
      id: "01",
      accountId: "111100000",
      firstName: "Joe",
      lastName: "Smith",
      email: "jsmith@gmail.com",
      countryCode: "5000",
    },
    text: {
      firstnametext: "First Name",
      lastnametext: "Last Name",
      emailtext: "Email",
      countrytext: "Country",
      editProfileHeader: "Edit your profile",
      editProfileSubHeader: "Personal Information",
      submitChangeButtonText: "Submit Changes",
    },
    formState: {
      country: "Canada",
      firstName: "Joe",
      lastName: "Smith",
      errors: null,
      error: "",
    },
  },
  callbacks: {
    onSubmit: (e) => console.log(e),
    onChange: (e) => console.log(e),
  },
};
export const Default = () => h(PortalProfileView, Object.assign({}, defaultProps));
export const DefaultNoCountry = () => h(PortalProfileView, Object.assign({}, noCountry));
export const Loading = () => h(PortalProfileView, Object.assign({}, loadingProps));
export const Disabled = () => h(PortalProfileView, Object.assign({}, disabledProps));
export const Error = () => h(PortalProfileView, Object.assign({}, errorProps));
export const Success = () => h(PortalProfileView, Object.assign({}, successProps));
