import{useForm as i}from"@inertiajs/react";import{useState as u}from"react";import{t as y}from"./topupService-Dx4mOjKy.js";const l=({initialSettings:o,updateRoute:n})=>{const{data:s,setData:r,post:a,processing:t,errors:e}=i(o||{});return{data:s,setData:r,submitSettings:c=>{c.preventDefault(),a(route(n))},processing:t,errors:e}},f=o=>{const[n,s]=u(null);return{syncTransaction:async t=>{s(t);try{await y.syncTransaction(o,t)}finally{s(null)}},syncingId:n,isSyncing:t=>n===t}};export{f as a,l as u};
