import { type User } from 'src/types/user';

/** Step state for pill and icon (generic, not tied to vacations) */
export type ApproverStepState = 'approved' | 'pending' | 'rejected' | 'waiting';
export type PotentialApprover = Pick<
  User,
  | 'createdAt'
  | 'deleted'
  | 'email'
  | 'fullName'
  | 'employeeInternalId'
  | 'firstName'
  | 'hiringDate'
  | 'id'
  | 'isAgent'
  | 'lastName'
  | 'profilePicture'
> & {
  status: 'ACTIVE' | 'INACTIVE';
};

/** Single step in the approvers accordion (generic shape for any module) */
export type ApproverStepItem = {
  id: string | number;
  position: number;
  title: string;
  state: ApproverStepState;
  /** Optional pill label; if not set, derived from state */
  pillLabel?: string;
  /** Assigned approver when step has one */
  approver?: User;
  /** Potential approvers when step has no assignee (shown as list) */
  potentialApprovers?: PotentialApprover[];
  /** Whether this accordion item is expanded by default */
  defaultExpanded?: boolean;
};
