"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isTemplateRevertable;
var _constants = require("./constants");
/**
 * Internal dependencies
 */

/**
 * Check if a template is revertable to its original theme-provided template file.
 *
 * @param {Object} template The template entity to check.
 * @return {boolean} Whether the template is revertable.
 */
function isTemplateRevertable(template) {
  if (!template) {
    return false;
  }
  /* eslint-disable camelcase */
  return template?.source === _constants.TEMPLATE_ORIGINS.custom && (Boolean(template?.plugin) || template?.has_theme_file);
  /* eslint-enable camelcase */
}
//# sourceMappingURL=is-template-revertable.js.map