import { h } from "@stencil/core";
import LoadingView from "./sqm-tax-and-cash/LoadingView";
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "./subregions";
import { taxTypeToName } from "./utils";
export default {
  title: "Components/Tax Form",
};
const stepOneProps = {
  states: {
    step: "1",
    hideSteps: false,
    hideState: false,
    loading: false,
    disabled: false,
    isPartner: false,
    isUser: false,
    loadingError: false,
    formState: {
      firstName: "Bob",
      lastName: "Testerson",
      email: "bobtesterson@example.com",
      phoneNumberCountryCode: "US",
      phoneNumber: "555 555 5555",
      countryCode: "US",
      currency: "CAD",
      address: "2/1337 Johnson Street",
      city: "Vancouver",
      state: "BC",
      postalCode: "555 555",
      errors: {},
    },
  },
  data: {
    partnerData: {},
    regionLabelEnum: "STATE",
    regions: [],
    phoneCountries: [
      {
        countryCode: "CA",
        displayName: "Canada",
      },
    ],
    countries: [
      {
        countryCode: "CA",
        displayName: "Canada",
      },
      {
        countryCode: "ES",
        displayName: "Spain",
      },
      {
        countryCode: "UK",
        displayName: "United Kingdom",
      },
      {
        countryCode: "US",
        displayName: "United States",
      },
      {
        countryCode: "AR",
        displayName: "Argentina",
      },
      {
        countryCode: "AU",
        displayName: "Australia",
      },
      {
        countryCode: "ZW",
        displayName: "Zimbabwe",
      },
    ],
    currencies: [
      {
        currencyCode: "CAD",
        displayName: "CAD",
      },
      {
        currencyCode: "GBP",
        displayName: "GBP",
      },
      {
        currencyCode: "USD",
        displayName: "USD",
      },
    ],
    allCountries: [
      {
        countryCode: "CA",
        displayName: "Canada",
      },
      {
        countryCode: "ES",
        displayName: "Spain",
      },
      {
        countryCode: "UK",
        displayName: "United Kingdom",
      },
      {
        countryCode: "US",
        displayName: "United States",
      },
    ],
    allCurrencies: [
      {
        currencyCode: "CAD",
        displayName: "CAD",
      },
      {
        currencyCode: "GBP",
        displayName: "GBP",
      },
      {
        currencyCode: "USD",
        displayName: "USD",
      },
    ],
    userData: {
      firstName: "",
      lastName: "",
    },
  },
  refs: {
    formRef: { current: null },
    currencyRef: { current: null },
    phoneCountryRef: { current: null },
  },
};
const stepTwoProps = {
  states: {
    step: "2",
    hideSteps: false,
    disabled: false,
    loading: false,
    isPartner: false,
    loadingError: false,
    formState: {
      checked: undefined,
      errors: {},
    },
  },
  callbacks: {
    onSubmit: async () => console.log("Submit"),
    onChange: () => console.log("Submit"),
    onBack: () => console.log("Submit"),
    onFormChange: (field, e) => console.log(field, e),
    onQstToggle: () => { },
    onSpainToggle: () => { },
    setCountrySearch: (c) => console.log(c),
  },
  data: {
    esRegions: INDIRECT_TAX_SPAIN_REGIONS,
    countries: [
      {
        countryCode: "CA",
        displayName: "Canada",
      },
      {
        countryCode: "ES",
        displayName: "Spain",
      },
      {
        countryCode: "UK",
        displayName: "United Kingdom",
      },
      {
        countryCode: "US",
        displayName: "United States",
      },
    ],
    allCountries: [
      {
        countryCode: "CA",
        displayName: "Canada",
      },
      {
        countryCode: "ES",
        displayName: "Spain",
      },
      {
        countryCode: "UK",
        displayName: "United Kingdom",
      },
      {
        countryCode: "US",
        displayName: "United States",
      },
    ],
    provinces: INDIRECT_TAX_PROVINCES,
  },
  slotProps: {
    formState: {
      errors: {},
    },
  },
  refs: { formRef: { current: null } },
};
const stepFourProps = {
  states: {
    showVerification: false,
    step: "4",
    hideSteps: false,
    disabled: false,
    loading: false,
    hasPayPal: false,
    isPartner: false,
    hideBackButton: false,
    saveDisabled: false,
    thresholds: [],
    loadingError: false,
    email: "test@example.com",
    formState: {
      paymentMethodChecked: "toBankAccount",
    },
    showModal: false,
  },
  callbacks: {
    onVerificationHide: () => { },
    onVerification: () => { },
    onSubmit: async () => console.log("Submit"),
    setPaymentMethodChecked: () => { },
    setPaymentScheduleChecked: () => { },
    onBack: async () => console.log("back"),
    setCountrySearch: () => { },
    onModalOpen: () => { },
    onModalClose: () => { },
  },
  refs: { formRef: { current: null } },
};
const docusignFormProps = {
  states: {
    showExitButton: true,
    step: "3",
    urlLoading: false,
    docusignStatus: undefined,
    hideSteps: false,
    documentType: "W9",
    documentTypeString: "W9",
    loading: false,
    disabled: false,
    participantTypeDisabled: false,
    loadingError: false,
    formState: {
      participantType: "individualParticipant",
      errors: {},
      taxFormExpired: false,
    },
    showModal: false,
  },
  callbacks: {
    onExit: () => { },
    completeDocument: async () => { },
    setParticipantType: (p) => console.log({ p }),
    setDocusignStatus: (status) => console.log(status),
    onModalOpen: () => { },
    onModalClose: () => { },
  },
};
const dashboardProps = {
  states: {
    veriffLoading: false,
    payoutStatus: "DONE",
    canEditPayoutInfo: true,
    disabled: false,
    status: "ACTIVE",
    documentType: "W9",
    documentTypeString: taxTypeToName("W9"),
    dateSubmitted: "Jan 18th, 2025",
    noFormNeeded: false,
    country: "United Kingdom",
    indirectTaxNumber: "123456",
    indirectTaxType: "VAT",
    showNewFormDialog: false,
    hasHold: false,
  },
  slots: {
    payoutDetailsCardSlot: (h("sqm-payout-details-card", { demoData: {
        states: {
          badgeStatus: "nextPayout",
        },
      } })),
  },
};
export const GeneralLoadingView = () => {
  return h(LoadingView, null);
};
export const GeneralErrorView = () => {
  return (h("sqm-form-message", { type: "error" },
    h("p", { part: "alert-title" }, "There was a problem loading your form"),
    h("p", { part: "alert-description" }, "Please refresh the page and try again. If this problem continues, contact our support team.")));
};
// STEP ONE
export const StepOne = () => {
  return h("sqm-user-info-form", { demoData: stepOneProps });
};
export const StepOneLoading = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: { ...stepOneProps.states, loading: true },
    } }));
};
export const StepOneDisabled = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: { ...stepOneProps.states, disabled: true },
    } }));
};
export const StepOneIsUser = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: { ...stepOneProps.states, isUser: true },
    } }));
};
export const StepOneIsPartner = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: { ...stepOneProps.states, disabled: true, isPartner: true },
    } }));
};
export const StepOneWithErrors = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: {
        ...stepOneProps.states,
        formState: {
          ...stepOneProps.states.formState,
          errors: {
            firstName: true,
            lastName: true,
            email: true,
            countryCode: true,
            currency: true,
            participantType: true,
            allowBankingCollection: true,
          },
        },
      },
    } }));
};
export const StepOneWithGeneralError = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: {
        ...stepOneProps.states,
        formState: {
          ...stepOneProps.states.formState,
          errors: {
            general: true,
          },
        },
      },
    } }));
};
export const StepOneWithLoadingError = () => {
  return (h("sqm-user-info-form", { demoData: {
      states: {
        ...stepOneProps.states,
        loadingError: true,
        loading: true,
        formState: {
          ...stepOneProps.states.formState,
        },
      },
    } }));
};
// STEP TWO
export const StepTwoLoading = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        loading: true,
      },
    } }));
};
export const StepTwoLoadingError = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        loading: true,
        loadingError: true,
      },
    } }));
};
export const StepTwoDisabled = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        disabled: true,
      },
    } }));
};
export const StepTwoIsPartner = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        isPartner: true,
      },
    } }));
};
export const StepTwoWithGeneralError = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          errors: {
            general: true,
          },
        },
      },
    } }));
};
export const StepTwoOtherRegionChecked = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "UK",
          indirectTaxNumber: "123456",
          errors: {},
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedCanada = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "CA",
          province: "BRITISHCOLUMBIA",
          indirectTaxNumber: "123456",
          errors: {},
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedCanadaGST = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "CA",
          province: "QUEBEC",
          indirectTaxNumber: "123456",
          errors: {},
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedCanadaGSTAndQST = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "CA",
          province: "QUEBEC",
          qstNumber: "654321",
          hasQst: true,
          errors: {},
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedOtherCountrySubRegion = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "ES",
          subRegion: "CANARYISLANDS",
          errors: {},
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "ES",
          subRegion: "CANARYISLANDS",
          hasSubRegionTaxNumber: true,
          subRegionTaxNumber: "654321",
          errors: {},
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedWithInputErrors = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          checked: "otherRegion",
          errors: {},
        },
      },
      slotProps: {
        formState: {
          province: "",
          selectedRegion: "GB",
          errors: {
            selectedRegion: true,
            indirectTaxNumber: true,
          },
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedCanadaWithProvinceError = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "CA",
          province: "BC",
          errors: {
            province: true,
            indirectTaxNumber: true,
          },
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedCanadaGSTAndQSTError = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "CA",
          province: "QUEBEC",
          hasQst: true,
          errors: {
            province: true,
            indirectTaxNumber: true,
            qstNumber: true,
          },
        },
      },
    } }));
};
export const StepTwoOtherRegionCheckedOtherCountrySubRegionErrors = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "otherRegion",
        },
      },
      slotProps: {
        formState: {
          selectedRegion: "ES",
          hasSubRegionTaxNumber: true,
          errors: {
            indirectTaxNumber: true,
            subRegionTaxNumberError: true,
            subRegion: true,
          },
        },
      },
    } }));
};
export const StepTwoNotRegisteredChecked = () => {
  return (h("sqm-indirect-tax-form", { demoData: {
      states: {
        ...stepTwoProps.states,
        formState: {
          ...stepTwoProps.states.formState,
          checked: "notRegistered",
        },
      },
    } }));
};
// STEP THREE
export const StepThreeWithDocusign = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        ...docusignFormProps.states,
      },
    } }));
};
export const StepThreeWithDocusignW8BEN = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
      },
    } }));
};
export const StepThreeWithDocusignW8BENE = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        formState: {
          taxFormExpired: false,
          participantType: "businessEntity",
          errors: {
            participantType: "",
            general: false,
          },
        },
      },
    } }));
};
export const StepThreeWithDocusignExpired = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        docusignStatus: "ttl_expired",
        formState: {
          participantType: "individualParticipant",
          taxFormExpired: true,
          errors: {},
        },
      },
    } }));
};
export const StepThreeWithDocusignCompleted = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        docusignStatus: "signing_complete",
        formState: {
          participantType: "individualParticipant",
          taxFormExpired: false,
          errors: {},
        },
      },
    } }));
};
export const StepThreeDocusignWithError = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        docusignStatus: "exception",
        formState: {
          ...docusignFormProps.states.formState,
          errors: {
            formSubmission: true,
          },
        },
      },
    } }));
};
export const StepThreeDocusignWithGeneralError = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        formState: {
          ...docusignFormProps.states.formState,
          errors: {
            general: true,
          },
        },
      },
    } }));
};
export const StepThreeDocusignWithLoadingError = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        loadingError: true,
        formState: {
          ...docusignFormProps.states.formState,
        },
      },
    } }));
};
export const StepThreeDocusignLoading = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        loading: true,
      },
    } }));
};
export const StepThreeDocusignDisabled = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        ...docusignFormProps.states,
        disabled: true,
      },
    } }));
};
export const StepThreeWithDocusignModalOpen = () => {
  return (h("sqm-docusign-form", { demoData: {
      states: {
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        ...docusignFormProps.states,
        showModal: true,
      },
    } }));
};
// STEP 4
export const StepFourDefault = () => {
  return h("sqm-banking-info-form", null);
};
export const StepFourIsPartner = () => {
  return (h("sqm-banking-info-form", { demoData: {
      ...stepFourProps,
      states: {
        ...stepFourProps.states,
        isPartner: true,
        formState: {
          ...stepFourProps.states.formState,
        },
      },
    } }));
};
export const StepFourDirectToBankChecked = () => {
  return (h("sqm-banking-info-form", { demoData: {
      ...stepFourProps,
      states: {
        ...stepFourProps.states,
        formState: {
          ...stepFourProps.states.formState,
        },
      },
    } }));
};
export const StepFourToPaypalChecked = () => {
  return (h("sqm-banking-info-form", { demoData: {
      ...stepFourProps,
      states: {
        ...stepFourProps.states,
        formState: {
          ...stepFourProps.states.formState,
          paymentMethodChecked: "toPayPalAccount",
        },
      },
    } }));
};
export const StepFourReVerifyEmail = () => {
  return (h("sqm-banking-info-form", { demoData: {
      ...stepFourProps,
      states: {
        ...stepFourProps.states,
        showVerification: true,
        isPartner: true,
        formState: {
          ...stepFourProps.states.formState,
          paymentMethodChecked: "toPayPalAccount",
        },
      },
    } }));
};
export const TaxAndCashDashboardActiveW9Form = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
    } }));
};
export const TaxAndCashDashboardActiveW8BENForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        noFormNeeded: false,
        canEditPayoutInfo: true,
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardActiveW8BENEForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        noFormNeeded: false,
        canEditPayoutInfo: true,
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNotActiveW9Form = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        veriffLoading: false,
        noFormNeeded: true,
        canEditPayoutInfo: true,
        status: "INACTIVE",
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        payoutStatus: "OVER_W9_THRESHOLD",
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNotActiveW8Form = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        noFormNeeded: false,
        canEditPayoutInfo: true,
        status: "INACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNotActiveNoForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        noFormNeeded: true,
        canEditPayoutInfo: true,
        status: "INACTIVE",
        documentType: "W8BEN",
        documentTypeString: "",
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNotVerifiedW9Form = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        canEditPayoutInfo: true,
        disabled: false,
        status: "NOT_VERIFIED",
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        noFormNeeded: false,
        country: "United States",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
        veriffLoading: false,
      },
    } }));
};
export const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "NOT_VERIFIED",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "NOT_VERIFIED",
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        country: "United Kingdom",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNotActiveW8BENEForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "NOT_ACTIVE",
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "123456",
        indirectTaxType: "VAT",
        country: "United Kingdom",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNoFormNeeded = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: true,
        province: "Ontario",
        country: "Canada",
        indirectTaxNumber: "123456",
        indirectTaxType: "GST",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIndirectTaxCanada = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        disabled: false,
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        province: "Ontario",
        country: "Canada",
        indirectTaxType: "GST",
        indirectTaxNumber: "123456",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        disabled: false,
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        province: "Quebec",
        country: "Canada",
        indirectTaxType: "GST",
        indirectTaxNumber: "123456",
        qstNumber: "44212",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIndirectTaxSpain = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        disabled: false,
        documentType: "W8BENE",
        documentTypeString: taxTypeToName("W8BENE"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        country: "Spain",
        subRegion: "Spain Proper",
        indirectTaxType: "VAT",
        indirectTaxNumber: "123456",
        subRegionTaxNumber: "44212",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIdentityVerifcationRequired = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "VERIFICATION:REQUIRED",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIdentityVerifcationRequiredInternal = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "VERIFICATION:INTERNAL",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIdentityVerifcationReviewInternal = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "VERIFICATION:REVIEW",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardIdentityVerifcationFailedInternal = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "VERIFICATION:FAILED",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardW9ThresholdReached = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "OVER_W9_THRESHOLD",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: null,
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: false,
        showNewFormDialog: false,
        hasHold: false,
        enforceUsTaxComplianceOption: "CASH_ONLY_DEFER_W9",
      },
    } }));
};
export const TaxAndCashDashboardNewTaxForm = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        notRegistered: true,
        showNewFormDialog: true,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardPayoutsOnHold = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "HOLD",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "123456",
        country: "Slovania",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalid = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "BENEFICIARY_NAME_INVALID",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: true,
        status: "ACTIVE",
        documentType: undefined,
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: true,
        indirectTaxNumber: "123456",
        country: "USA",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalidUS = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "BENEFICIARY_NAME_INVALID",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: true,
        status: "ACTIVE",
        documentType: undefined,
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: true,
        indirectTaxNumber: "123456",
        country: "USA",
        showNewFormDialog: false,
        hasHold: true,
        enforceUsTaxComplianceOption: "CASH_ONLY_DEFER_W9",
      },
    } }));
};
export const TaxAndCashDashboardNoDocumentType = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "ACTIVE",
        documentType: undefined,
        documentTypeString: "",
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "123456",
        country: "United Kingdom",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardNoDocumentTypeNoFormNeeded = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: undefined,
        documentType: undefined,
        documentTypeString: "",
        dateSubmitted: undefined,
        noFormNeeded: true,
        indirectTaxNumber: "123456",
        country: "United Kingdom",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardFallbackDocumentTypeW9 = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "ACTIVE",
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Mar 15, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "123456",
        country: "USA",
        showNewFormDialog: false,
        hasHold: false,
        enforceUsTaxComplianceOption: "CASH_ONLY_DEFER_W9",
      },
    } }));
};
export const TaxAndCashDashboardFallbackDocumentTypeW8BEN = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Feb 20, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "654321",
        country: "Canada",
        showNewFormDialog: false,
        hasHold: false,
        enforceUsTaxComplianceOption: "CASH_ONLY_DEFER_W9",
      },
    } }));
};
export const TaxAndCashDashboardDeferW9NoDocumentType = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: undefined,
        documentType: undefined,
        documentTypeString: "",
        dateSubmitted: undefined,
        noFormNeeded: true,
        indirectTaxNumber: "123456",
        country: "USA",
        showNewFormDialog: false,
        hasHold: false,
        enforceUsTaxComplianceOption: "CASH_ONLY_DEFER_W9",
      },
    } }));
};
export const TaxAndCashDashboardLoading = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "ACTIVE",
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        loading: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardWithLoadingError = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        disabled: false,
        canEditPayoutInfo: true,
        status: "ACTIVE",
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        loading: true,
        loadingError: true,
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashDashboardWithGeneralError = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: false,
        status: "ACTIVE",
        documentType: "W9",
        documentTypeString: taxTypeToName("W9"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "123456",
        indirectTaxType: "VAT",
        country: "Slovania",
        showNewFormDialog: false,
        hasHold: false,
        errors: {
          general: true,
        },
      },
    } }));
};
export const TaxAndCashDashboardDisabled = () => {
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
      ...dashboardProps,
      states: {
        payoutStatus: "DONE",
        veriffLoading: false,
        canEditPayoutInfo: true,
        disabled: true,
        status: "ACTIVE",
        documentType: "W8BEN",
        documentTypeString: taxTypeToName("W8BEN"),
        dateSubmitted: "Jan 18th, 2025",
        noFormNeeded: false,
        indirectTaxNumber: "123456",
        country: "Slovania",
        showNewFormDialog: false,
        hasHold: false,
      },
    } }));
};
export const TaxAndCashTextProps = () => {
  return (h("sqm-tax-and-cash", { demoData: {
      // @ts-ignore
      showTextProps: true,
    } }));
};
