import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import { EmptyStateUniDriver } from './EmptyState.uni.driver';

export function CollectionEmptyStateUniDriver(
  base: UniDriver,
  body: UniDriver,
) {
  const { getButton, getImage, ...rest } = EmptyStateUniDriver(base, body);

  return {
    ...rest,
    /**
     * Get 'New Item' CTA button driver
     */
    getNewItemButton: () => getButton('empty-state-new-item-button'),
    /**
     * Get empty new item image
     */
    getImageAddItem: () => getImage('empty-state-new-item-illustration'),
    /**
     * Get custom CTA
     */
    getCustomCta: (datahook: string) => base.$(`[data-hook="${datahook}"]`),
  };
}
