export interface FieldContext {
  role: string;
  tenantId: string;
}

export class VisibilityPolicy {
  isFieldWritable(questionCode: string, ctx: FieldContext): boolean {
    if (ctx.role === "Read-only") return false;
    if (questionCode.startsWith("SYS_")) return ctx.role === "Admin";
    return true;
  }
}
