import{a1 as i}from"./vendor-CmAScyG3.js";import{b as a}from"./page-index.tsx-D0oEuWOa.js";import{F as p}from"./page-FortuneWheel.ts-CaqHFvhq.js";import{a as f}from"./page-FortuneWheelWinModalContent.tsx-DESnY6qd.js";import{u as r}from"./page-fortuneWheel.ts-BU2wXqek.js";import{p as u}from"./page-wheel.ts-iP8trLQk.js";import{u as d,a as l}from"./page-FortuneWheelContainer.tsx-BbtPZTCU.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="8f677f99-f802-47d5-91d1-ff31e43d404a",t._sentryDebugIdIdentifier="sentry-dbid-8f677f99-f802-47d5-91d1-ff31e43d404a")}catch{}const w=()=>{const{openPopup:t}=d(),o=r(e=>e.setStep);return i({mutationFn:async()=>{const e=await a.post(f.config.api.fortuneWheel.spin);if(!e||typeof e!="object")throw new Error("Spin response is empty or invalid");return e},onSuccess:e=>{const{setSection:n}=r.getState(),s=u(e);n(s)},onError:e=>{const{setError:n,setSection:s}=r.getState();n((e==null?void 0:e.message)||"Spin request failed"),s(null),o(p.ERROR),t(l.popup.fortuneWheelError)}})};export{w as u};
//# sourceMappingURL=page-useFortuneWheelSpinMutation.ts-DO-x7GCP.js.map