/**
 * Unified policy/safety document slice (Workstream 11). One backend store backs
 * both the Safety Protocols and Handbook & Policies pages: `category` selects the
 * page, `tag` carries the finer sub-category (e.g. the handbook's
 * Operations/Behavior/Safety/Communication/Legal). Acknowledgment is persisted
 * per document version.
 */
export type PolicyDocumentCategory = 'safety_protocol' | 'handbook_policy';

export interface PolicyDocumentDto {
  readonly id: string;
  readonly title: string;
  readonly body: string | null;
  readonly category: PolicyDocumentCategory;
  readonly tag: string | null;
  /** Display name of the creating user (server-set). */
  readonly author: string | null;
  /** Author-filled structured content (safety protocols). */
  readonly steps: readonly string[] | null;
  readonly autism_considerations: readonly string[] | null;
  readonly version: number;
  readonly active: boolean;
  readonly organizationId: string | null;
  readonly campusId: string | null;
  readonly createdAt: string;
  readonly updatedAt: string;
}

export interface PolicyDocumentMutationDto {
  readonly title: string;
  readonly category: PolicyDocumentCategory;
  readonly body?: string;
  readonly tag?: string;
  readonly steps?: readonly string[];
  readonly autism_considerations?: readonly string[];
  readonly active?: boolean;
}

export interface PolicyAcknowledgmentDto {
  readonly id: string;
  readonly policyDocumentId: string;
  readonly version: number;
  readonly userId: string;
  readonly acknowledgedAt: string;
  readonly organizationId: string | null;
  readonly campusId: string | null;
  readonly createdAt: string;
  readonly updatedAt: string;
}

export interface PolicyAcknowledgeDto {
  readonly policyDocumentId: string;
}
