UNPKG

react-native-unit-components

Version:

Unit React Native components

36 lines (34 loc) 1.39 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCheckPaymentScript = exports.getCheckPaymentParams = void 0; var _bodyScript = require("../../scripts/html/bodyScript"); var _paymentsMessage = require("../../messages/webMessages/paymentsMessage"); const getCheckPaymentParams = props => { const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : ''; return ` ${accountIdParam} initial-stage-back-button="${props.initialStageBackButton ?? false}" final-stage-done-button="${props.finalStageDoneButton ?? false}" style="height: 100%" `; }; exports.getCheckPaymentParams = getCheckPaymentParams; const getCheckPaymentScript = () => { return ` window.addEventListener("${_paymentsMessage.PaymentMessage.PAYMENT_CREATED}", (e) => { const response = e.detail response.then((data) => { postMessageToSDK({ type: "${_paymentsMessage.PaymentMessage.PAYMENT_CREATED}", details: { data: JSON.stringify(data.data) }}) }).catch((e) => { console.log(e) }) }); ${_bodyScript.LISTENERS.requestRefresh} ${_bodyScript.LISTENERS.unitPaymentInitialStageBackButtonClicked} ${_bodyScript.LISTENERS.unitPaymentFinalStageDoneButtonClicked} `; }; exports.getCheckPaymentScript = getCheckPaymentScript; //# sourceMappingURL=UNCheckPaymentComponent.utils.js.map