import { BookingInsurance } from '@/shared/types/booking-types';
import { SingleAutocomplete } from '@/manager/shared/components/SingleAutocomplete';
import { BaseComponent } from '@/shared/base/BaseComponent';

export class BookingCreateInsurancePickerTable extends BaseComponent {
  readonly main = this.host.getByTestId('booking-form-insurances');
  readonly insuranceAutocomplete = new SingleAutocomplete(this.main.getByTestId('content-column-1'));

  async select(insurance: BookingInsurance): Promise<void> {
    await this.insuranceAutocomplete.fill(insurance.insurance.name);
  }
}
