import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import { baseUniDriverFactory } from '../../../../unidriver';

export function TimeEditUniDriver(base: UniDriver, _body: UniDriver) {
  const getInput = () => base.$('input');

  return {
    ...baseUniDriverFactory(base),
    getInputValue: () => getInput().attr('value'),
    clickInput: () => getInput().click(),
    clickClear: () => base.$('[data-hook="cell-time-input-clear"]').click(),
    hasClearButton: () =>
      base.$('[data-hook="cell-time-input-clear"]').exists(),
  };
}
