/** Sports Center Platform — shared TypeScript types aligned with backend DTOs. */

export type LifecycleStatus = "draft" | "active" | "inactive" | "suspended" | "archived";
export type MemberStatus = "active" | "inactive" | "suspended" | "cancelled";
export type MembershipStatus = "draft" | "active" | "suspended" | "frozen" | "cancelled" | "expired";
export type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "no_show";

export type OrmBase = {
  id: string;
  tenant_id: string;
  is_deleted: boolean;
  created_by: string | null;
  updated_by: string | null;
  created_at: string;
  updated_at: string;
};

export type ListParams = Record<string, string | number | undefined | null> & {
  page?: number;
  page_size?: number;
};

export type HealthResponse = { status: string; service: string; version: string };

export type CapabilitiesResponse = {
  service: string;
  version: string;
  phase: string;
  features: Record<string, boolean>;
  independence: {
    standalone: boolean;
    superapp: boolean;
    integrations: string[];
    integration_mode: string;
  };
};

export type SportsCenter = OrmBase & {
  code: string;
  name: string;
  description: string | null;
  status: LifecycleStatus;
  legal_name: string | null;
  timezone: string;
  language: string;
  currency_code: string;
  settings: Record<string, unknown> | null;
  version: number;
};

export type Member = OrmBase & {
  sports_center_id: string;
  branch_id: string | null;
  member_number: string;
  display_name: string;
  first_name: string | null;
  last_name: string | null;
  email: string | null;
  mobile: string | null;
  status: MemberStatus;
  version: number;
};

export type Coach = OrmBase & {
  sports_center_id: string;
  code: string;
  display_name: string;
  staff_kind: string;
  status: LifecycleStatus;
};
