"use strict";

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

/**
 * Check if a template is removable.
 *
 * @param {Object} template The template entity to check.
 * @return {boolean} Whether the template is removable.
 */
function isTemplateRemovable(template) {
  if (!template) {
    return false;
  }
  return template.source === _constants.TEMPLATE_ORIGINS.custom && !Boolean(template.plugin) && !template.has_theme_file;
}
//# sourceMappingURL=is-template-removable.js.map