System.register(['reactive-jsx', 'src/components/halo/lively-halo-item.js', 'src/client/morphic/component-loader.js', 'src/client/graphics.js'], function (_export, _context) {
  "use strict";

  var _addSourceLocation, HaloItem, componentLoader, pt;

  return {
    setters: [function (_reactiveJsx) {
      _addSourceLocation = _reactiveJsx.addSourceLocation;
    }, function (_srcComponentsHaloLivelyHaloItemJs) {
      HaloItem = _srcComponentsHaloLivelyHaloItemJs.default;
    }, function (_srcClientMorphicComponentLoaderJs) {
      componentLoader = _srcClientMorphicComponentLoaderJs.default;
    }, function (_srcClientGraphicsJs) {
      pt = _srcClientGraphicsJs.pt;
    }],
    execute: function () {
      const __SystemJSRewritingHack = {};
      _recorder_._src_components_halo_lively_halo_style_item_js = _recorder_._src_components_halo_lively_halo_style_item_js || {};
      Object.defineProperty(_recorder_._src_components_halo_lively_halo_style_item_js, 'HaloItem', {
        get() {
          return HaloItem;
        },

        set(thisIsVererySecretVariableName) {
          HaloItem = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_components_halo_lively_halo_style_item_js, 'componentLoader', {
        get() {
          return componentLoader;
        },

        set(thisIsVererySecretVariableName) {
          componentLoader = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_components_halo_lively_halo_style_item_js, 'pt', {
        get() {
          return pt;
        },

        set(thisIsVererySecretVariableName) {
          pt = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      class HaloStyleItem extends HaloItem {

        async onClick(evt) {
          if (evt.composedPath().find(ea => ea.tagName == "LIVELY-STYLE-EDITOR")) return;

          var inspectTarget = window.that;

          var editor = this.querySelector("lively-style-editor");
          if (editor) {
            editor.remove();
          } else {
            editor = await _addSourceLocation(lively.create("lively-style-editor"), {
              file: 'https://lively-kernel.org/lively4/lively4-portal/src/components/halo/lively-halo-style-item.js',
              end: {
                column: 59,
                line: 16
              },
              start: {
                column: 23,
                line: 16
              }
            });
            editor.setTarget(inspectTarget);
            editor.hideTargetButton();
            this.appendChild(editor);

            lively.setPosition(editor, pt(0, -110)
            // this.hideHalo(); 
            );
          }
        }

        updateTarget(target) {
          var editor = this.querySelector("lively-style-editor");
          if (editor) {
            editor.setTarget(target);
          }
        }

      }

      _export('default', HaloStyleItem);

      Object.defineProperty(_recorder_._src_components_halo_lively_halo_style_item_js, 'HaloStyleItem', {
        get() {
          return HaloStyleItem;
        },

        set(thisIsVererySecretVariableName) {
          _export('default', HaloStyleItem = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
    }
  };
});