'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-0b1e2673.js');
require('./_commonjsHelpers-937cd5b3.js');
const index$1 = require('./index-1a9e1965.js');

const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";

const SmoothlyTriggerSource = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.trigger = index.createEvent(this, "trigger", 7);
    this.message = index.createEvent(this, "message", 7);
  }
  componentDidLoad() {
    index$1.Message.listen(this.listen, (destination, content) => {
      if (index$1.Trigger.is(content))
        this.trigger.emit(content);
      else
        this.message.emit({ destination, content });
    }, window);
  }
  render() {
    return index.h("slot", null);
  }
  get element() { return index.getElement(this); }
};
SmoothlyTriggerSource.style = styleCss;

exports.smoothly_trigger_source = SmoothlyTriggerSource;
