@frak-labs/components 0.0.26-beta.b38eef2e → 0.0.26-beta.bbbb3d22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/cdn/Banner.BrrxJ-YP.js +132 -0
  2. package/cdn/ButtonShare.D6sav-O3.js +1 -0
  3. package/cdn/ButtonWallet.DalZLwGv.js +40 -0
  4. package/cdn/OpenInAppButton.BBj09SVF.js +1 -0
  5. package/cdn/PostPurchase.CXHETVu7.js +47 -0
  6. package/cdn/components.js +1 -1
  7. package/cdn/formatReward.CU8k_jx9.js +1 -0
  8. package/cdn/jsxRuntime.module.D7jbXhdY.js +58 -0
  9. package/cdn/loader.css +0 -14
  10. package/cdn/loader.js +66 -1
  11. package/cdn/sprinkles.css.ts.vanilla.BtNHSSRm.js +1175 -0
  12. package/cdn/useLightDomStyles.x0mCz8nV.js +1 -0
  13. package/cdn/useReward.Cbh2WzQ3.js +1 -0
  14. package/cdn/useShareModal.DsoI-v9u.js +1 -0
  15. package/dist/GiftIcon-BrNVWoWm.js +1246 -0
  16. package/dist/banner.d.ts +116 -0
  17. package/dist/banner.js +405 -0
  18. package/dist/buttonShare.d.ts +8 -6
  19. package/dist/buttonShare.js +60 -101
  20. package/dist/buttonWallet.d.ts +10 -2
  21. package/dist/buttonWallet.js +79 -38
  22. package/dist/formatReward-_UYA3aHE.js +26 -0
  23. package/dist/openInApp.d.ts +4 -2
  24. package/dist/openInApp.js +23 -27
  25. package/dist/postPurchase.d.ts +122 -0
  26. package/dist/postPurchase.js +1744 -0
  27. package/dist/useLightDomStyles-Cjpf0MnX.js +41 -0
  28. package/dist/usePlacement-LqYjZLX_.js +248 -0
  29. package/dist/useReward-XF2hB_C_.js +65 -0
  30. package/dist/useShareModal-Bmlk3eBJ.js +53 -0
  31. package/package.json +29 -19
  32. package/cdn/ButtonShare.CSPl5Bi5.js +0 -1
  33. package/cdn/ButtonWallet.3Hp62hGr.js +0 -1
  34. package/cdn/OpenInAppButton.BTvukMkp.js +0 -1
  35. package/cdn/Spinner.DQogVqic.js +0 -1
  36. package/cdn/initFrakSdk.CMgrZQwQ.js +0 -14
  37. package/cdn/useClientReady.CKKC4IMk.js +0 -1
  38. package/dist/Spinner-Btnwk01x.js +0 -36
  39. package/dist/Spinner-CHZD3tMn.css +0 -1
  40. package/dist/buttonShare.css +0 -1
  41. package/dist/buttonWallet.css +0 -1
  42. package/dist/openInApp.css +0 -1
  43. package/dist/useClientReady-0vKBG0-p.js +0 -197
  44. package/dist/useReward-DAkT-7wT.js +0 -48
@@ -1 +0,0 @@
1
- import{C as e,_ as t,b as n,g as r,r as i,t as a,v as o,x as s,y as c}from"./initFrakSdk.CMgrZQwQ.js";function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function u(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var d=[`context`,`children`],f=[`useFragment`];function p(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){h.call(this,r)},i.prototype.attributeChangedCallback=_,i.prototype.disconnectedCallback=v,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function m(e){this.getChildContext=function(){return e.context};var t=e.children;return o(t,u(e,d))}function h(e){var n=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(n),this._vdom=c(m,l({},this._props,{context:n.detail.context}),b(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?t:r)(this._vdom,this._root)}function g(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function _(e,t,n){if(this._vdom){var i={};i[e]=n??=void 0,i[g(e)]=n,this._vdom=o(this._vdom,i),r(this._vdom,this._root)}}function v(){r(this._vdom=null,this._root)}function y(e,t){var r=this,i=e.useFragment,a=u(e,f);return c(i?n:`slot`,l({},a,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,r._listener))):r.ref.removeEventListener(`_preact`,r._listener)}}))}function b(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},a=0,o=e.attributes,s=e.childNodes;for(a=o.length;a--;)o[a].name!==`slot`&&(i[o[a].name]=o[a].value,i[g(o[a].name)]=o[a].value);for(a=s.length;a--;){var l=b(s[a],null,n),u=s[a].slot;u?i[u]=c(y,{name:u},l):r[a]=l}var d=!(!n||!n.shadow),f=t?c(y,{useFragment:!d},r):r;return!d&&t&&(e.innerHTML=``),c(t||e.nodeName.toLowerCase(),i,f)}function x(t,n,r=[],i={shadow:!1}){typeof window<`u`&&(e(a),customElements.get(n)||p(t,n,r,i))}var S,C,w,T,E=0,D=[],O=s,k=O.__b,A=O.__r,j=O.diffed,M=O.__c,N=O.unmount,P=O.__;function F(e,t){O.__h&&O.__h(C,e,E||t),E=0;var n=C.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function I(e){return E=1,L(q,e)}function L(e,t,n){var r=F(S++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):q(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=C,!C.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};C.__f=!0;var a=C.shouldComponentUpdate,o=C.componentWillUpdate;C.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},C.shouldComponentUpdate=i}return r.__N||r.__}function R(e,t){var n=F(S++,3);!O.__s&&K(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function z(e,t){var n=F(S++,7);return K(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function B(e,t){return E=8,z(function(){return e},t)}function V(){for(var e;e=D.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(W),t.__h.some(G),t.__h=[]}catch(n){t.__h=[],O.__e(n,e.__v)}}}O.__b=function(e){C=null,k&&k(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),P&&P(e,t)},O.__r=function(e){A&&A(e),S=0;var t=(C=e.__c).__H;t&&(w===C?(t.__h=[],C.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(W),t.__h.some(G),t.__h=[],S=0)),w=C},O.diffed=function(e){j&&j(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(D.push(t)!==1&&T===O.requestAnimationFrame||((T=O.requestAnimationFrame)||U)(V)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),w=C=null},O.__c=function(e,t){t.some(function(e){try{e.__h.some(W),e.__h=e.__h.filter(function(e){return!e.__||G(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],O.__e(n,e.__v)}}),M&&M(e,t)},O.unmount=function(e){N&&N(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{W(e)}catch(e){t=e}}),n.__H=void 0,t&&O.__e(t,n.__v))};var H=typeof requestAnimationFrame==`function`;function U(e){var t,n=function(){clearTimeout(r),H&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);H&&(t=requestAnimationFrame(n))}function W(e){var t=C,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),C=t}function G(e){var t=C;e.__c=e.__(),C=t}function K(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function q(e,t){return typeof t==`function`?t(e):t}function J(){let[e,t]=I(!0),n=B(()=>{t(!1)},[]);return R(()=>(i(`add`,n),()=>i(`remove`,n)),[n]),{isClientReady:!e}}export{R as a,B as i,z as n,x as o,I as r,J as t};
@@ -1,36 +0,0 @@
1
- import { cx } from "class-variance-authority";
2
- import { jsx, jsxs } from "preact/jsx-runtime";
3
-
4
- //#region src/components/Spinner/index.module.css?css_module
5
- const classes = {
6
- "spinner": "M4fSKa_spinner",
7
- "rt-spinner-leaf-fade": "M4fSKa_rt-spinner-leaf-fade",
8
- "spinner__leaf": "M4fSKa_spinner__leaf"
9
- };
10
- const _spinner0 = classes["spinner"];
11
- const _rt_spinner_leaf_fade0 = classes["rt-spinner-leaf-fade"];
12
- const _spinner__leaf0 = classes["spinner__leaf"];
13
-
14
- //#endregion
15
- //#region src/components/Spinner/index.tsx
16
- const Spinner = ({ ref, className, ...props }) => {
17
- return /* @__PURE__ */ jsxs("span", {
18
- ...props,
19
- ref,
20
- className: cx(classes.spinner),
21
- children: [
22
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
23
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
24
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
25
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
26
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
27
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
28
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf }),
29
- /* @__PURE__ */ jsx("span", { className: classes.spinner__leaf })
30
- ]
31
- });
32
- };
33
- Spinner.displayName = "Spinner";
34
-
35
- //#endregion
36
- export { Spinner as t };
@@ -1 +0,0 @@
1
- .M4fSKa_spinner{--spinner-opacity:.65;opacity:var(--spinner-opacity);width:16px;height:16px;display:block;position:relative}.M4fSKa_spinner__leaf{--spinner-animation-duration:.8s;width:12.5%;height:100%;animation:M4fSKa_rt-spinner-leaf-fade var(--spinner-animation-duration) linear infinite;position:absolute;top:0;left:43.75%;&:before{content:"";background-color:currentColor;border-radius:3px;width:100%;height:30%;display:block}&:where(:first-child){animation-delay:calc(-8 / 8 * var(--spinner-animation-duration));transform:rotate(0)}&:where(:nth-child(2)){animation-delay:calc(-7 / 8 * var(--spinner-animation-duration));transform:rotate(45deg)}&:where(:nth-child(3)){animation-delay:calc(-6 / 8 * var(--spinner-animation-duration));transform:rotate(90deg)}&:where(:nth-child(4)){animation-delay:calc(-5 / 8 * var(--spinner-animation-duration));transform:rotate(135deg)}&:where(:nth-child(5)){animation-delay:calc(-4 / 8 * var(--spinner-animation-duration));transform:rotate(180deg)}&:where(:nth-child(6)){animation-delay:calc(-3 / 8 * var(--spinner-animation-duration));transform:rotate(225deg)}&:where(:nth-child(7)){animation-delay:calc(-2 / 8 * var(--spinner-animation-duration));transform:rotate(270deg)}&:where(:nth-child(8)){animation-delay:calc(-1 / 8 * var(--spinner-animation-duration));transform:rotate(315deg)}}@keyframes M4fSKa_rt-spinner-leaf-fade{0%{opacity:1}to{opacity:.25}}
@@ -1 +0,0 @@
1
- .nOB7Uq_buttonShare{justify-content:center;align-items:center;gap:10px;display:flex}
@@ -1 +0,0 @@
1
- .Kl62ia_button{all:unset;z-index:2000000;cursor:pointer;text-align:center;background-color:#3e557e;border-radius:50%;justify-content:center;align-items:center;width:45px;height:45px;font-size:24px;display:flex;position:fixed;bottom:20px}.Kl62ia_button__left{left:20px}.Kl62ia_button__right{right:20px}.Kl62ia_reward{color:#fff;white-space:nowrap;background:#ff3f3f;border-radius:5px;padding:2px 3px;font-size:9px;font-weight:600;line-height:9px;position:absolute;top:-4px;right:27px}
@@ -1 +0,0 @@
1
- .XYfqGq_button{justify-content:center;align-items:center;gap:10px;display:flex}
@@ -1,197 +0,0 @@
1
- import register from "preact-custom-element";
2
- import { setupClient } from "@frak-labs/core-sdk";
3
- import * as coreSdk from "@frak-labs/core-sdk/bundle";
4
- import { displayEmbeddedWallet, modalBuilder, referralInteraction } from "@frak-labs/core-sdk/actions";
5
- import { useCallback, useEffect, useState } from "preact/hooks";
6
-
7
- //#region ../../packages/ui/utils/onDocumentReady.ts
8
- /**
9
- * When the document is ready, run the callback
10
- * @param callback
11
- */
12
- function onDocumentReady(callback) {
13
- if (document.readyState === "complete" || document.readyState === "interactive") setTimeout(callback, 1);
14
- else if (document.addEventListener) document.addEventListener("DOMContentLoaded", callback);
15
- else document.attachEvent("onreadystatechange", () => {
16
- if (document.readyState === "complete") callback();
17
- });
18
- }
19
-
20
- //#endregion
21
- //#region src/utils/safeVibrate.ts
22
- /**
23
- * Attempt to vibrate the device
24
- */
25
- function safeVibrate() {
26
- if ("vibrate" in navigator) navigator.vibrate(10);
27
- else console.log("Vibration not supported");
28
- }
29
-
30
- //#endregion
31
- //#region src/components/ButtonWallet/utils.ts
32
- /**
33
- * Open the wallet modal
34
- *
35
- * @description
36
- * This function will open the wallet modal with the configuration provided in the `window.FrakSetup.modalWalletConfig` object.
37
- */
38
- function openWalletModal() {
39
- if (!window.FrakSetup?.client) {
40
- console.error("Frak client not found");
41
- return;
42
- }
43
- safeVibrate();
44
- displayEmbeddedWallet(window.FrakSetup.client, window.FrakSetup?.modalWalletConfig ?? {});
45
- }
46
-
47
- //#endregion
48
- //#region src/utils/clientReady.ts
49
- const CUSTOM_EVENT_NAME = "frakClientReady";
50
- /**
51
- * Dispatch a custom event when the Frak client is ready
52
- */
53
- function dispatchClientReadyEvent() {
54
- const event = new CustomEvent(CUSTOM_EVENT_NAME);
55
- window.dispatchEvent(event);
56
- }
57
- /**
58
- * Add or remove an event listener for when the Frak client is ready
59
- * @param action
60
- * @param callback
61
- */
62
- function onClientReady(action, callback) {
63
- if (window.FrakSetup?.client && action === "add") {
64
- callback();
65
- return;
66
- }
67
- (action === "add" ? window.addEventListener : window.removeEventListener)(CUSTOM_EVENT_NAME, callback, false);
68
- }
69
-
70
- //#endregion
71
- //#region src/utils/setup.ts
72
- /**
73
- * Setup the modal config
74
- * @param client
75
- */
76
- function setupModalConfig(client) {
77
- window.modalBuilderSteps = modalBuilder(client, window.FrakSetup?.modalConfig ?? {});
78
- }
79
- /**
80
- * Setup the referral
81
- * @param client
82
- */
83
- async function setupReferral(client) {
84
- const referral = await referralInteraction(client);
85
- console.log("referral", referral);
86
- }
87
- /**
88
- * Return the modal builder steps
89
- */
90
- function getModalBuilderSteps() {
91
- if (!window.modalBuilderSteps) throw new Error("modalBuilderSteps not found");
92
- return window.modalBuilderSteps;
93
- }
94
-
95
- //#endregion
96
- //#region src/utils/initFrakSdk.ts
97
- /**
98
- * Initializes the Frak SDK client and sets up necessary configurations.
99
- * This function handles the one-time setup of the Frak client and related features.
100
- *
101
- * @returns {Promise<void>}
102
- */
103
- async function initFrakSdk() {
104
- window.FrakSetup.core = coreSdk;
105
- if (!preChecks()) return;
106
- console.log("[Frak SDK] Starting initialization");
107
- if (!window.FrakSetup.config) {
108
- console.error("[Frak SDK] Configuration not found");
109
- window.frakSetupInProgress = false;
110
- return;
111
- }
112
- const client = await setupClient({ config: window.FrakSetup.config });
113
- if (!client) {
114
- console.error("[Frak SDK] Failed to create client");
115
- window.frakSetupInProgress = false;
116
- return;
117
- }
118
- window.FrakSetup.client = client;
119
- console.log("[Frak SDK] Client initialized successfully");
120
- dispatchClientReadyEvent();
121
- setupModalConfig(client);
122
- setupReferral(client);
123
- window.frakSetupInProgress = false;
124
- handleActionQueryParam();
125
- }
126
- /**
127
- * Pre-checks for the Frak SDK initialization
128
- * Sets frakSetupInProgress flag atomically to prevent race conditions
129
- */
130
- function preChecks() {
131
- if (window.frakSetupInProgress) {
132
- console.log("[Frak SDK] Initialization already in progress");
133
- return false;
134
- }
135
- window.frakSetupInProgress = true;
136
- if (window.FrakSetup?.client) {
137
- console.log("[Frak SDK] Client already initialized");
138
- window.frakSetupInProgress = false;
139
- return false;
140
- }
141
- if (!window.FrakSetup?.config) {
142
- console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set.");
143
- window.frakSetupInProgress = false;
144
- return false;
145
- }
146
- return true;
147
- }
148
- /**
149
- * Check the query param contain params for an auto opening of the frak modal
150
- */
151
- function handleActionQueryParam() {
152
- const frakAction = new URLSearchParams(window.location.search).get("frakAction");
153
- if (!frakAction) return;
154
- if (frakAction === "share") {
155
- console.log("[Frak SDK] Auto open query param found");
156
- openWalletModal();
157
- }
158
- }
159
-
160
- //#endregion
161
- //#region src/utils/registerWebComponent.ts
162
- /**
163
- * Registers a Preact component as a custom web component
164
- *
165
- * @param component - The Preact component to register
166
- * @param tagName - The custom element tag name (e.g., "frak-button-wallet")
167
- * @param observedAttributes - Array of attribute names to observe for changes
168
- * @param options - Registration options (e.g., { shadow: false })
169
- */
170
- function registerWebComponent(component, tagName, observedAttributes = [], options = { shadow: false }) {
171
- if (typeof window !== "undefined") {
172
- onDocumentReady(initFrakSdk);
173
- if (!customElements.get(tagName)) register(component, tagName, observedAttributes, options);
174
- }
175
- }
176
-
177
- //#endregion
178
- //#region src/hooks/useClientReady.ts
179
- /**
180
- * Hook to manage client readiness state for the wallet button
181
- * Handles subscription to client ready events and manages readiness state
182
- * @returns Object containing the readiness state of the client
183
- */
184
- function useClientReady() {
185
- const [disabled, setDisabled] = useState(true);
186
- const handleClientReady = useCallback(() => {
187
- setDisabled(false);
188
- }, []);
189
- useEffect(() => {
190
- onClientReady("add", handleClientReady);
191
- return () => onClientReady("remove", handleClientReady);
192
- }, [handleClientReady]);
193
- return { isClientReady: !disabled };
194
- }
195
-
196
- //#endregion
197
- export { openWalletModal as i, registerWebComponent as n, getModalBuilderSteps as r, useClientReady as t };
@@ -1,48 +0,0 @@
1
- import { formatAmount, getCurrencyAmountKey } from "@frak-labs/core-sdk";
2
- import { getMerchantInformation } from "@frak-labs/core-sdk/actions";
3
- import { useEffect, useState } from "preact/hooks";
4
-
5
- //#region src/utils/getCurrentReward.ts
6
- function getFixedFiatAmount(estimated, key) {
7
- if (!estimated || estimated.payoutType !== "fixed") return 0;
8
- return estimated.amount[key];
9
- }
10
- function getMaxFixedReferrerReward(rewards, key) {
11
- return rewards.reduce((max, reward) => Math.max(max, getFixedFiatAmount(reward.referrer, key)), 0);
12
- }
13
- async function getCurrentReward({ targetInteraction }) {
14
- const client = window.FrakSetup?.client;
15
- if (!client) {
16
- console.warn("Frak client not ready yet");
17
- return;
18
- }
19
- const { rewards } = await getMerchantInformation(client);
20
- const currencyAmountKey = getCurrencyAmountKey(client.config.metadata?.currency);
21
- const maxReward = getMaxFixedReferrerReward(targetInteraction ? rewards.filter((r) => r.interactionTypeKey === targetInteraction) : rewards, currencyAmountKey);
22
- if (maxReward <= 0) return;
23
- return formatAmount(Math.round(maxReward), client.config.metadata?.currency);
24
- }
25
-
26
- //#endregion
27
- //#region src/hooks/useReward.ts
28
- /**
29
- * Hook to fetch and format the current reward value for a given interaction
30
- * @param shouldUseReward - Flag to determine if reward should be fetched
31
- * @param targetInteraction - Optional interaction type to get specific reward for
32
- * @param currency - The currency to use for the reward (default is "eur")
33
- * @returns Object containing the formatted reward value in euros
34
- */
35
- function useReward(shouldUseReward, targetInteraction) {
36
- const [reward, setReward] = useState(void 0);
37
- useEffect(() => {
38
- if (!shouldUseReward) return;
39
- getCurrentReward({ targetInteraction }).then((reward) => {
40
- if (!reward) return;
41
- setReward(reward);
42
- });
43
- }, [shouldUseReward, targetInteraction]);
44
- return { reward };
45
- }
46
-
47
- //#endregion
48
- export { useReward as t };