/**
 * useQuery / useMutation - Data fetching composable types for STX
 *
 * Runtime implementations live in signals.ts. These are TypeScript interfaces
 * and server-safe stubs.
 */
export declare interface UseQueryOptions<T = unknown> {
  initialData?: T
  staleTime?: number
  cacheTime?: number
  cacheKey?: string
  headers?: Record<string, string>
  transform?: (data: unknown) => T
  refetchOnFocus?: boolean
  refetchInterval?: number
  immediate?: boolean
  onSuccess?: (data: T) => void
  onError?: (error: Error) => void
}
export declare interface UseQueryResult<T = unknown> {
  data: { (): T | null, set: (v: T | null) => void }
  loading: { (): boolean, set: (v: boolean) => void }
  error: { (): string | null, set: (v: string | null) => void }
  isStale: { (): boolean, set: (v: boolean) => void }
  refetch: () => Promise<void>
  invalidate: () => Promise<void>
}
export declare interface UseMutationOptions<T = unknown> {
  method?: 'POST' | 'PUT' | 'PATCH' | 'DELETE'
  headers?: Record<string, string>
  transform?: (data: unknown) => T
  optimisticData?: T | ((body: unknown) => T)
  invalidateQueries?: string[]
  onSuccess?: (data: T) => void
  onError?: (error: Error) => void
}
export declare interface UseMutationResult<T = unknown> {
  data: { (): T | null, set: (v: T | null) => void }
  loading: { (): boolean, set: (v: boolean) => void }
  error: { (): string | null, set: (v: string | null) => void }
  mutate: (body?: unknown) => Promise<T>
  reset: () => void
}
