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_edit_item_js = _recorder_._src_components_halo_lively_halo_edit_item_js || {};
      _recorder_._src_components_halo_lively_halo_edit_item_js.HaloItem = HaloItem;
      class HalloEditItem extends _recorder_._src_components_halo_lively_halo_edit_item_js.HaloItem {

        onClick() {
          lively.notify("toggle edit");
          if (this.target.getAttribute("contenteditable") == "true") {
            this.target.setAttribute("contenteditable", null);
          } else {
            this.target.setAttribute("contenteditable", true);
          }

          this.updateTarget(this.target);
        }

        updateTarget(target) {
          this.target = target;
          if (target.getAttribute("contenteditable") == "true") {
            this.get("#label").classList.remove("disabled");
          } else {
            this.get("#label").classList.add("disabled");
          }
        }
      }

      _export("default", HalloEditItem);

      _recorder_._src_components_halo_lively_halo_edit_item_js.HalloEditItem = HalloEditItem;
    }
  };
});