export type ActionResponse<T = any> = {
  success: boolean
  data?: T
  error?: string
}

export function createSuccessResponse<T>(data: T): ActionResponse<T> {
  return {
    success: true,
    data,
    error: undefined,
  }
}

export function createErrorResponse(error: string): ActionResponse {
  return {
    success: false,
    data: undefined,
    error,
  }
}
