import { r as registerInstance, j as createEvent, h, g as getElement } from './index-aeac5cad.js';
import './_commonjsHelpers-91fffb88.js';
import { M as Message, T as Trigger } from './index-4920b0b3.js';

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

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

export { SmoothlyTriggerSource as smoothly_trigger_source };
