import { isArray } from "../../../../../@vue/shared/dist/shared.esm-bundler.mjs";
import { unref } from "vue";
const isTriggerType = (trigger, type) => {
  if (isArray(trigger)) return trigger.includes(type);
  return trigger === type;
};
const whenTrigger = (trigger, type, handler) => {
  return (e) => {
    isTriggerType(unref(trigger), type) && handler(e);
  };
};
export {
  isTriggerType,
  whenTrigger
};
