export declare const mobx = "\nimport {\n makeAutoObservable,\n runInAction\n} from 'mobx';\n\nimport { QueryStatus } from '@tanstack/react-query';\n\nexport interface MobxResponse {\n data: T | undefined;\n isSuccess: boolean;\n isLoading: boolean;\n refetch: () => Promise;\n}\n\nexport class QueryStore {\n state?: QueryStatus;\n request?: Request;\n response?: Response;\n fetchFunc?: (request: Request) => Promise;\n\n constructor(fetchFunc?: (request: Request) => Promise) {\n this.fetchFunc = fetchFunc;\n makeAutoObservable(this)\n }\n\n get isLoading() {\n return this.state === 'loading';\n }\n\n get isSuccess() {\n return this.state === 'success';\n }\n\n refetch = async (): Promise => {\n runInAction(() => {\n this.response = void 0;\n this.state = 'loading';\n });\n try {\n if (!this.fetchFunc)\n throw new Error(\n 'Query Service not initialized or request function not implemented'\n );\n if (!this.request) throw new Error('Request not provided');\n const response = await this.fetchFunc(this.request);\n runInAction(() => {\n this.response = response;\n this.state = 'success';\n });\n console.log(\n '%cquery.rpc.Query.ts line:572 this.state',\n 'color: #007acc;',\n this.state,\n this.response\n );\n } catch (e) {\n console.error(e);\n runInAction(() => {\n this.state = 'error';\n });\n }\n }\n\n getData(request?: Request): MobxResponse {\n runInAction(() => {\n this.request = request;\n });\n return {\n data: this.response,\n isSuccess: this.isSuccess,\n isLoading: this.isLoading,\n refetch: this.refetch,\n };\n }\n}\n";