import type { Page } from "@playwright/test";

export class RoleDetailPage {
  private page: Page;
  constructor(page: Page) {
    this.page = page;
  }

  async goto(id: string) {
    await this.page.goto(`/user-management/role/${id}`);
  }

  get heading() {
    return this.page.getByRole("heading", { name: /role detail/i });
  }

  get editButton() {
    return this.page.getByRole("button", { name: /edit role/i });
  }

  get deactivateButton() {
    return this.page.getByRole("button", { name: /deactivate/i });
  }

  get reactivateButton() {
    return this.page.getByRole("button", { name: /reactivate/i });
  }

  get backButton() {
    return this.page.getByRole("button", { name: /back/i });
  }
}
