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

export function DocumentEditUniDriver(base: UniDriver, _body: UniDriver) {
  return {
    ...baseUniDriverFactory(base),
    hasAddButton: () =>
      base.$('[data-hook="document-edit-add-button"]').exists(),
    hasPasteUrlButton: () =>
      base.$('[data-hook="document-edit-paste-url-button"]').exists(),
    hasTag: () => base.$('[data-hook="document-edit-tag"]').exists(),
    hasMoreButton: () =>
      base.$('[data-hook="document-edit-more-button"]').exists(),
    isLoading: () =>
      base.$('[data-hook="document-edit"] [data-hook="loader"]').exists(),
  };
}
