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

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