import { isDemo } from "@saasquatch/component-boilerplate";
import { withHooks } from "@saasquatch/stencil-hooks";
import { Component, h, Prop } from "@stencil/core";
import deepmerge from "deepmerge";
import { getProps } from "../../../utils/utils";
import { PayoutStatusAlertView, } from "./sqm-payout-status-alert-view";
import { usePayoutStatus } from "./usePayoutStatus";
import { parseStates } from "../../../utils/parseStates";
/**
 * @uiName Payout Status Alert
 * @validParents ["sqm-portal-container","div","sqm-hero","sqm-instant-access-registration","sqm-brand","sqb-program-section","sqb-conditional-section"]
 * @exampleGroup Tax and Cash
 * @example Payout Status Alert - <sqm-payout-status-alert></sqm-payout-status-alert>
 */
export class PayoutStatusAlert {
  constructor() {
    /**
     * @uiName Info required alert header
     */
    this.informationRequiredHeader = "Payout and tax information required";
    /**
     *
     * @uiName Edit payment info button label
     */
    this.editPaymentInformationButton = "Edit Payout Information";
    /**
     * @uiName Submit new tax form button label
     */
    this.newFormButton = "Submit new tax form";
    /**
     * @uiName Info required alert description
     */
    this.informationRequiredDescription = "Submit your banking details and tax documents to receive your rewards.";
    /**
     * @uiName Info required alert button text
     */
    this.informationRequiredButtonText = "Payouts & Tax Settings";
    /**
     * @uiName Verification required alert header
     */
    this.verificationRequiredHeader = "Verify your identity";
    /**
     * @uiName Verification required alert description
     */
    this.verificationRequiredDescription = "It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.";
    /**
     * @uiName Verification required alert button text
     */
    this.verificationRequiredButtonText = "Start Verification";
    /**
     * @uiName Verification required internal alert header
     */
    this.verificationRequiredInternalHeader = "Identity Verification in progress";
    /**
     * @uiName Verification required internal alert description
     */
    this.verificationRequiredInternalDescription = "Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.";
    /**
     * @uiName Verification review internal alert header
     */
    this.verificationReviewInternalHeader = "Identity Verification under review";
    /**
     * @uiName Verification review internal alert description
     */
    this.verificationReviewInternalDescription = "Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.";
    /**
     * @uiName Verification failed internal alert header
     */
    this.verificationFailedInternalHeader = "Identity verification unsuccessful";
    /**
     * @uiName Verification failed internal alert description
     */
    this.verificationFailedInternalDescription = "Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.";
    /**
     * @uiName Account review alert header
     */
    this.accountReviewHeader = "Your account is under review";
    /**
     * @uiName Account review alert description
     */
    this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise.  It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
    /**
     * @uiName Payment on hold alert header
     */
    this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
    /**
     * @uiName Payment on hold alert description
     */
    this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
    /**
     * @uiName Beneficiary name invalid alert header
     */
    this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
    /**
     * @uiName Beneficiary name invalid description
     */
    this.beneficiaryNameInvalidDescription = "The account holder (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
    /**
     * @uiName Beneficiary name mismatch alert header
     */
    this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
    /**
     * @uiName Beneficiary name mismatch alert description
     */
    this.beneficiaryNameMismatchDescription = "The account holder (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
    /**
     * @uiName Bank name mismatch alert header
     */
    this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
    /**
     * @uiName Bank name mismatch alert description
     */
    this.bankTaxNameMismatchDescription = "The bank account (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
    /**
     * @uiName Withdrawal settings invalid alert header
     */
    this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
    /**
     * @uiName Withdrawal settings invalid alert description
     */
    this.withdrawalSettingsInvalidDescription = "There are missing fields or invalid characters in your payment information. Please review your information and make sure it is correct. Your payouts are on hold until this is resolved.";
    /**
     * @uiName Payment returned alert header
     */
    this.paymentReturnedHeader = "Payout unsuccessful";
    /**
     * @uiName Payment returned alert description
     */
    this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
    /**
     * @uiName W-9 payment threshold alert header
     */
    this.w9RequiredHeader = "Your next payout is on hold";
    /**
     * @uiName W-9 payment threshold alert description
     */
    this.w9RequiredDescription = "You have surpassed the $2000 threshold requiring a W-9 form or have multiple accounts with impact.com. To remove the hold, please submit your W-9 form.";
    /**
     * @uiName W-9 payment threshold alert button text
     */
    this.w9RequiredButtonText = "Submit W-9";
    /**
     * @uiName Payout on hold alert header
     */
    this.holdHeader = "Your payouts and account are on hold";
    /**
     * @uiName Payout on hold alert description
     */
    this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our {supportLink}.";
    /**
     * @uiName Cash & Payouts Microsite Page (only set if alert is used in a microsite)
     */
    this.cashPayoutsPageUrl = "/taxAndCash";
    /**
     * @uiName Support link text
     */
    this.supportLink = "support team";
    /**
     * @uiName Terms and Conditions text
     */
    this.termsAndConditions = "Terms and Conditions";
    /**
     * @uiName Error header
     */
    this.errorHeader = "Could not determine payout status.";
    /**
     * @uiName Error description
     */
    this.errorDescription = "There was an error with determining your payout status.";
    /**
     * @undocumented
     * @componentState { "title": "Payout Info Required", "props": { "states": { "status": "INFORMATION_REQUIRED" } }, "dependencies": ["sqm-payout-status-alert"] }
     * @componentState { "title": "Verification Required", "props": { "states": { "status": "VERIFICATION:REQUIRED" } }, "dependencies": ["sqm-payout-status-alert"] }
     * @componentState { "title": "Identity Verification", "props": { "states": { "status": "VERIFICATION:REVIEW" } }, "dependencies": ["sqm-payout-status-alert"] }
     * @componentState { "title": "Account Hold", "props": { "states": { "status": "HOLD" } }, "dependencies": ["sqm-payout-status-alert"] }
     */
    this.stateController = "{}";
    withHooks(this);
  }
  disconnectedCallback() { }
  getTextProps() {
    return getProps(this);
  }
  render() {
    const props = isDemo()
      ? useDemoPayoutStatusAlert(this)
      : usePayoutStatus(this);
    return h(PayoutStatusAlertView, Object.assign({}, props));
  }
  static get is() { return "sqm-payout-status-alert"; }
  static get encapsulation() { return "shadow"; }
  static get properties() { return {
    "informationRequiredHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Info required alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "information-required-header",
      "reflect": false,
      "defaultValue": "\"Payout and tax information required\""
    },
    "editPaymentInformationButton": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Edit payment info button label",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "edit-payment-information-button",
      "reflect": false,
      "defaultValue": "\"Edit Payout Information\""
    },
    "newFormButton": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Submit new tax form button label",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "new-form-button",
      "reflect": false,
      "defaultValue": "\"Submit new tax form\""
    },
    "informationRequiredDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Info required alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "information-required-description",
      "reflect": false,
      "defaultValue": "\"Submit your banking details and tax documents to receive your rewards.\""
    },
    "informationRequiredButtonText": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Info required alert button text",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "information-required-button-text",
      "reflect": false,
      "defaultValue": "\"Payouts & Tax Settings\""
    },
    "verificationRequiredHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification required alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-required-header",
      "reflect": false,
      "defaultValue": "\"Verify your identity\""
    },
    "verificationRequiredDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification required alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-required-description",
      "reflect": false,
      "defaultValue": "\"It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.\""
    },
    "verificationRequiredButtonText": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification required alert button text",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-required-button-text",
      "reflect": false,
      "defaultValue": "\"Start Verification\""
    },
    "verificationRequiredInternalHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification required internal alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-required-internal-header",
      "reflect": false,
      "defaultValue": "\"Identity Verification in progress\""
    },
    "verificationRequiredInternalDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification required internal alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-required-internal-description",
      "reflect": false,
      "defaultValue": "\"Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.\""
    },
    "verificationReviewInternalHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification review internal alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-review-internal-header",
      "reflect": false,
      "defaultValue": "\"Identity Verification under review\""
    },
    "verificationReviewInternalDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification review internal alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-review-internal-description",
      "reflect": false,
      "defaultValue": "\"Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.\""
    },
    "verificationFailedInternalHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification failed internal alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-failed-internal-header",
      "reflect": false,
      "defaultValue": "\"Identity verification unsuccessful\""
    },
    "verificationFailedInternalDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Verification failed internal alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "verification-failed-internal-description",
      "reflect": false,
      "defaultValue": "\"Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.\""
    },
    "accountReviewHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Account review alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "account-review-header",
      "reflect": false,
      "defaultValue": "\"Your account is under review\""
    },
    "accountReviewDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Account review alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "account-review-description",
      "reflect": false,
      "defaultValue": "\"This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise.  It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.\""
    },
    "paymentHoldOnChangeHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Payment on hold alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "payment-hold-on-change-header",
      "reflect": false,
      "defaultValue": "\"We are reviewing your new payout settings\""
    },
    "paymentHoldOnChangeDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Payment on hold alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "payment-hold-on-change-description",
      "reflect": false,
      "defaultValue": "\"Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.\""
    },
    "beneficiaryNameInvalidHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Beneficiary name invalid alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "beneficiary-name-invalid-header",
      "reflect": false,
      "defaultValue": "\"Your payment information does not match your tax form\""
    },
    "beneficiaryNameInvalidDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Beneficiary name invalid description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "beneficiary-name-invalid-description",
      "reflect": false,
      "defaultValue": "\"The account holder (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
    },
    "beneficiaryNameMismatchHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Beneficiary name mismatch alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "beneficiary-name-mismatch-header",
      "reflect": false,
      "defaultValue": "\"Your payment information does not match your tax form\""
    },
    "beneficiaryNameMismatchDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Beneficiary name mismatch alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "beneficiary-name-mismatch-description",
      "reflect": false,
      "defaultValue": "\"The account holder (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
    },
    "bankTaxNameMismatchHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Bank name mismatch alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "bank-tax-name-mismatch-header",
      "reflect": false,
      "defaultValue": "\"Your payment information does not match your tax form\""
    },
    "bankTaxNameMismatchDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Bank name mismatch alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "bank-tax-name-mismatch-description",
      "reflect": false,
      "defaultValue": "\"The bank account (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
    },
    "withdrawalSettingsInvalidHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Withdrawal settings invalid alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "withdrawal-settings-invalid-header",
      "reflect": false,
      "defaultValue": "\"Your payment information is incomplete or includes invalid characters\""
    },
    "withdrawalSettingsInvalidDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Withdrawal settings invalid alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "withdrawal-settings-invalid-description",
      "reflect": false,
      "defaultValue": "\"There are missing fields or invalid characters in your payment information. Please review your information and make sure it is correct. Your payouts are on hold until this is resolved.\""
    },
    "paymentReturnedHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Payment returned alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "payment-returned-header",
      "reflect": false,
      "defaultValue": "\"Payout unsuccessful\""
    },
    "paymentReturnedDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Payment returned alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "payment-returned-description",
      "reflect": false,
      "defaultValue": "\"Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.\""
    },
    "w9RequiredHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "W-9 payment threshold alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "w-9-required-header",
      "reflect": false,
      "defaultValue": "\"Your next payout is on hold\""
    },
    "w9RequiredDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "W-9 payment threshold alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "w-9-required-description",
      "reflect": false,
      "defaultValue": "\"You have surpassed the $2000 threshold requiring a W-9 form or have multiple accounts with impact.com. To remove the hold, please submit your W-9 form.\""
    },
    "w9RequiredButtonText": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "W-9 payment threshold alert button text",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "w-9-required-button-text",
      "reflect": false,
      "defaultValue": "\"Submit W-9\""
    },
    "holdHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Payout on hold alert header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "hold-header",
      "reflect": false,
      "defaultValue": "\"Your payouts and account are on hold\""
    },
    "holdDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Payout on hold alert description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "hold-description",
      "reflect": false,
      "defaultValue": "\"Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our {supportLink}.\""
    },
    "cashPayoutsPageUrl": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Cash & Payouts Microsite Page (only set if alert is used in a microsite)",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "cash-payouts-page-url",
      "reflect": false,
      "defaultValue": "\"/taxAndCash\""
    },
    "supportLink": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Support link text",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "support-link",
      "reflect": false,
      "defaultValue": "\"support team\""
    },
    "termsAndConditions": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Terms and Conditions text",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "terms-and-conditions",
      "reflect": false,
      "defaultValue": "\"Terms and Conditions\""
    },
    "errorHeader": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Error header",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "error-header",
      "reflect": false,
      "defaultValue": "\"Could not determine payout status.\""
    },
    "errorDescription": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Error description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "error-description",
      "reflect": false,
      "defaultValue": "\"There was an error with determining your payout status.\""
    },
    "stateController": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [{
            "text": undefined,
            "name": "undocumented"
          }, {
            "text": "{ \"title\": \"Payout Info Required\", \"props\": { \"states\": { \"status\": \"INFORMATION_REQUIRED\" } }, \"dependencies\": [\"sqm-payout-status-alert\"] }",
            "name": "componentState"
          }, {
            "text": "{ \"title\": \"Verification Required\", \"props\": { \"states\": { \"status\": \"VERIFICATION:REQUIRED\" } }, \"dependencies\": [\"sqm-payout-status-alert\"] }",
            "name": "componentState"
          }, {
            "text": "{ \"title\": \"Identity Verification\", \"props\": { \"states\": { \"status\": \"VERIFICATION:REVIEW\" } }, \"dependencies\": [\"sqm-payout-status-alert\"] }",
            "name": "componentState"
          }, {
            "text": "{ \"title\": \"Account Hold\", \"props\": { \"states\": { \"status\": \"HOLD\" } }, \"dependencies\": [\"sqm-payout-status-alert\"] }",
            "name": "componentState"
          }],
        "text": ""
      },
      "attribute": "state-controller",
      "reflect": false,
      "defaultValue": "\"{}\""
    },
    "demoData": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "DemoData<PayoutStatusAlertViewProps>",
        "resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; veriffLoading: boolean; enforceUsTaxComplianceOption?: EnforceUsTaxComplianceOption; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
        "references": {
          "DemoData": {
            "location": "import",
            "path": "../../../global/demo"
          },
          "PayoutStatusAlertViewProps": {
            "location": "import",
            "path": "./sqm-payout-status-alert-view"
          }
        }
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [{
            "text": undefined,
            "name": "undocumented"
          }, {
            "text": "object",
            "name": "uiType"
          }],
        "text": ""
      }
    }
  }; }
}
function useDemoPayoutStatusAlert(props) {
  const states = parseStates(props.stateController);
  const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-payout-status-alert"
    ? { ...prev, ...states[key] }
    : { ...prev, [`${key}_stateController`]: states[key] }, {});
  return deepmerge({
    states: {
      error: false,
      status: states.status,
      loading: false,
      veriffLoading: false,
    },
    data: { type: "SquatchAdmin" },
    text: props.getTextProps(),
    callbacks: {
      onTermsClick: () => { },
      onClick: () => console.log("show"),
      onPaymentInfoClick: () => { },
      onNewFormClick: () => { },
    },
  }, props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
}
