import { useEffect as i } from "react";
import { merge as p } from "../../utilities/merge.es.js";
import { MultiSelectSize as c } from "./MultiSelect.es.js";
const n = (r) => {
  const t = ["tw-pr-9"];
  switch (r) {
    case c.Small:
      t.push("tw-pl-3 tw-py-1");
      break;
    case c.Medium:
      t.push("tw-pl-[19px] tw-py-[11px]");
      break;
    default:
      return;
  }
  return p(t);
}, w = (r, t, s) => {
  i(() => {
    function e(o) {
      s != null && s.find(
        (u) => u && (o.target === u || u.contains(o.target))
      ) || t();
    }
    return document.addEventListener("mousedown", e), () => {
      document.removeEventListener("mousedown", e);
    };
  }, [t, r, s]);
};
export {
  n as getPaddingClasses,
  w as useClickOutside
};
//# sourceMappingURL=helpers.es.js.map
