import { r as registerInstance, h } from './index-07845439.js';
import { T as Trigger, M as Message } from './index-f068b00b.js';
import './index-265fba1f.js';

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

const SmoothlyTriggerSink = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  get filters() {
    if (!this.filtersValue)
      this.filtersValue = this.filter ? this.filter.split(" ") : [];
    return this.filtersValue;
  }
  TriggerListener(event) {
    if (Trigger.is(event.detail) && this.filters.some(f => f == event.detail.name)) {
      Message.send(this.destination, event.detail, this.context || window);
      event.preventDefault();
      event.stopPropagation();
    }
  }
  render() {
    return h("slot", null);
  }
};
SmoothlyTriggerSink.style = styleCss;

export { SmoothlyTriggerSink as smoothly_trigger_sink };
