import { BaseDialog } from '@/manager/shared/base/BaseDialog';
import { getSnackbarHost } from '@/manager/shared/utils/locator-utils';
import { Page } from '@playwright/test';

export class BookingRemovePriceChangeDialog extends BaseDialog {
  readonly snackbar = getSnackbarHost(this.host, 'Price adjustment successfully removed');

  constructor(host: Page) {
    super(host, 'booking-price-change-remove-dialog');
  }

  async confirm(): Promise<void> {
    await Promise.all([this.snackbar.waitFor(), this.submitButton.click()]);
  }
}
