import { BaseComponent } from '@/shared/modules/base/components/BaseComponent';

export class BookingDiscountCodeForm extends BaseComponent {
  private readonly addButton = this.host.getByTestId('discount-add-button');
  private readonly applyButton = this.host.getByTestId('discount-apply-button');
  private readonly input = this.host.locator('input');
  readonly discountTerms = this.host.getByTestId('discount-sub-title');

  async fill(code: string): Promise<void> {
    await this.addButton.click();
    await this.input.fill(code);
    await this.applyButton.click();
  }
}
