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

export function CollectionListItemUniDriver(base: UniDriver, body: UniDriver) {
  const getColumn = <T>(index: number, factory: UniDriverFactory<T>) =>
    factory(
      base.$(`[data-hook="collection-list-column"]:nth-child(${index + 1})`),
      body,
    );

  return {
    getColumn,
  };
}
