"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.currentUserCanImportForApp = currentUserCanImportForApp;
exports.isImportingBlockedBySync = exports.SYNC_STATUS_NOT_SYNCING = exports.isSupportedApp = exports.SUPPORTED_DB_FILE_IMPORT_SITE_TYPES = exports.SQL_IMPORT_FILE_SIZE_LIMIT = void 0;

var _fileSize = require("../constants/file-size");

/**
 * 
 * @format
 */

/**
 * Internal dependencies
 */
const SQL_IMPORT_FILE_SIZE_LIMIT = 10 * _fileSize.GB_IN_BYTES;
exports.SQL_IMPORT_FILE_SIZE_LIMIT = SQL_IMPORT_FILE_SIZE_LIMIT;

function currentUserCanImportForApp(app) {
  // TODO: implement
  return !!app;
}

const SUPPORTED_DB_FILE_IMPORT_SITE_TYPES = ['WordPress'];
exports.SUPPORTED_DB_FILE_IMPORT_SITE_TYPES = SUPPORTED_DB_FILE_IMPORT_SITE_TYPES;

const isSupportedApp = ({
  type
}) => SUPPORTED_DB_FILE_IMPORT_SITE_TYPES.includes(type);

exports.isSupportedApp = isSupportedApp;
const SYNC_STATUS_NOT_SYNCING = 'not_syncing';
exports.SYNC_STATUS_NOT_SYNCING = SYNC_STATUS_NOT_SYNCING;

const isImportingBlockedBySync = ({
  syncProgress: {
    status
  }
}) => status !== SYNC_STATUS_NOT_SYNCING;

exports.isImportingBlockedBySync = isImportingBlockedBySync;