import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import { DatePickerUniDriver as DatePickerUniDriverOriginal } from '@wix/design-system/dist/testkit/unidriver';
import { UniDriverFactory } from '../components/uniDriverFactory';
import { DatePickerUniDriver as DatePickerUniDriverFactory } from '@wix/design-system/dist/types/DatePicker/DatePicker.uni.driver';

export const DatePickerUniDriver = async (base: UniDriver, body: UniDriver) =>
  (DatePickerUniDriverOriginal as UniDriverFactory<DatePickerUniDriverFactory>)(
    base,
    body,
    {
      dataHook: (await base.attr('data-hook')) as string | undefined,
    },
  );
