import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import {
  EmptyStateUniDriver,
  TextButtonUniDriver,
} from '@wix/design-system/dist/testkit/unidriver';
import { baseUniDriverFactory } from '../../unidriver';

export default (base: UniDriver, body: UniDriver) => {
  return {
    ...baseUniDriverFactory(base),
    ...EmptyStateUniDriver(base.$('[data-hook="error-card-state"'), body),

    getRetryButton: () =>
      TextButtonUniDriver(
        base.$('[data-hook="error-card-state-action-button"]'),
        body,
      ),
  };
};
