function makeClientConfigHealthCheck(options) {
  return {
    async check(credentials) {
      const parsed = options.schema.safeParse(credentials ?? {});
      if (!parsed.success) {
        const first = parsed.error.issues[0];
        return {
          status: "unhealthy",
          message: `${options.providerLabel} OAuth client config invalid: ${first?.message ?? "unknown validation error"}`,
          details: { reason: "invalid_oauth_client" }
        };
      }
      return {
        status: "healthy",
        message: `${options.providerLabel} OAuth client configured`,
        details: { clientIdConfigured: true, ...options.healthyDetails?.(parsed.data) ?? {} }
      };
    }
  };
}
export {
  makeClientConfigHealthCheck
};
//# sourceMappingURL=provider-health.js.map
