export type OrganizationStatus = 'ACTIVE' | 'SUSPENDED';

export interface PlatformOrganizationSummary {
  id: string;
  name: string;
  phone?: string | null;
  city?: string | null;
  status: OrganizationStatus;
  createdAt: string;
  updatedAt: string;
  admin?: {
    id: string;
    name: string;
    email: string;
    status: string;
    createdAt: string;
  } | null;
  stats: {
    usersCount: number;
  };
  auditLogs?: PlatformAuditLogItem[];
}

export interface PlatformOrganizationDetail {
  id: string;
  name: string;
  phone?: string | null;
  city?: string | null;
  status: OrganizationStatus;
  createdAt: string;
  updatedAt: string;
  admin?: {
    id: string;
    name: string;
    email: string;
    role?: string;
    status: string;
    createdAt: string;
  } | null;
  users?: Array<{
    id: string;
    name: string;
    email: string;
    role: string;
    status: string;
    createdAt: string;
  }>;
  stats: {
    usersCount: number;
  };
  auditLogs?: PlatformAuditLogItem[];
}

export interface PlatformAuditLogItem {
  id: string;
  actorId: string | null;
  action: string;
  targetType: string | null;
  targetId: string | null;
  ipAddress: string | null;
  metadata: Record<string, unknown> | null;
  createdAt: string;
  actor: {
    id: string;
    name: string;
    email: string;
    role: string;
  } | null;
}

export type PlatformRouteId = 'p-overview' | 'p-tenants' | 'p-audit';

export type BadgeTone = 'green' | 'amber' | 'red' | 'blue' | 'indigo' | 'gray' | 'accent';
