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

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

  async goto(id: string) {
    await this.page.goto(`/product/category/${id}`);
  }

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

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

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

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