import { h } from "@stencil/core";
import { NameFieldsView } from "./sqm-name-fields-view";
import scenario from "../sqm-name-fields/sqm-name-fields.feature";
export default {
  title: "Components/Name Fields",
  parameters: {
    scenario,
  },
};
const props = {
  states: {
    optional: false,
    registrationFormState: {
      validationErrors: undefined,
    },
    content: {
      firstNameLabel: "First Name",
      lastNameLabel: "Last Name",
    },
  },
};
const errorProps = {
  states: {
    optional: false,
    registrationFormState: {
      validationErrors: {
        firstName: "Cannot be empty",
        lastName: "Cannot be empty",
      },
    },
    content: {
      firstNameLabel: "First Name",
      lastNameLabel: "Last Name",
    },
  },
};
export const NameFields = () => {
  return h(NameFieldsView, Object.assign({}, props));
};
export const NameFieldsWithErrors = () => {
  return h(NameFieldsView, Object.assign({}, errorProps));
};
