import type { Client } from "../client/types";

export const PUBLIC_POOL_CLIENT_ID = "client_public_pool";
export const PUBLIC_POOL_CONTEXT_LABEL = "Открытый контур";
export const PUBLIC_POOL_CONTEXT_DESCRIPTION = "Public access pool";

export const PUBLIC_POOL_CLIENT: Client = {
  id: PUBLIC_POOL_CLIENT_ID,
  type: "person",
  name: PUBLIC_POOL_CONTEXT_LABEL,
  legalName: PUBLIC_POOL_CONTEXT_DESCRIPTION,
  status: "active",
  contractStartsAt: null,
  contractEndsAt: null,
  paidUntil: null,
  demoEndsAt: null,
  contactName: "NODE.DC",
  contactEmail: null,
  avatarUrl: null,
  notes: "Системный контур для публичных заявок, публичных инвайтов и self-service пользователей.",
  createdAt: "2026-05-09T00:00:00.000Z",
  updatedAt: "2026-05-09T00:00:00.000Z",
};

export function isPublicPoolClientId(clientId: string | null | undefined): boolean {
  return clientId === PUBLIC_POOL_CLIENT_ID;
}
