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

export function EmptyStateUniDriver(base: UniDriver, body: UniDriver) {
  return {
    ...WSDEmptyStateUniDriver(base, body),
    wait: (timeout?: number) => base.wait(timeout),
    /**
     * Get empty state CTA button driver
     */
    getButton: (dataHook: string) =>
      TextButtonUniDriver(base.$(`[data-hook="${dataHook}"]`), body),

    /**
     * Get empty state image
     */
    getImage: (dataHook: string) =>
      ImageUniDriver(base.$(`[data-hook="${dataHook}"]`), body),
  };
}
