System.register(["src/components/halo/lively-halo-item.js"], function (_export, _context) {
  "use strict";

  var HaloItem;
  return {
    setters: [function (_srcComponentsHaloLivelyHaloItemJs) {
      HaloItem = _srcComponentsHaloLivelyHaloItemJs.default;
    }],
    execute: function () {
      _recorder_._src_components_halo_lively_halo_remove_item_js = _recorder_._src_components_halo_lively_halo_remove_item_js || {};
      _recorder_._src_components_halo_lively_halo_remove_item_js.HaloItem = HaloItem;
      class HaloRemoveItem extends _recorder_._src_components_halo_lively_halo_remove_item_js.HaloItem {

        onClick() {
          var deleteTarget = window.that;
          if (deleteTarget && this.isAllowedToBeDeleted(deleteTarget)) {

            if (deleteTarget.haloRemove) {
              deleteTarget.haloRemove();
            } else {
              deleteTarget.remove();
            }
            window.that = undefined;
          }
          this.hideHalo();
        }

        isAllowedToBeDeleted(element) {
          var deleteBlacklist = ["body", "html"];
          return deleteBlacklist.indexOf(element.localName) < 0;
        }
      }

      _export("default", HaloRemoveItem);

      _recorder_._src_components_halo_lively_halo_remove_item_js.HaloRemoveItem = HaloRemoveItem;
    }
  };
});