"use client";
import { jsx } from "react/jsx-runtime";
import * as React from "react";
import { ComboboxInput } from "./ComboboxInput.js";
import { useAvailableEvents } from "./EventSelect.js";
function EventPatternInput({
  value,
  onChange,
  placeholder = "sales.orders.created",
  disabled,
  categories,
  modules
}) {
  const { events } = useAvailableEvents({ categories, modules });
  const suggestions = React.useMemo(
    () => events.map((event) => ({
      value: event.id,
      label: event.label,
      description: event.id
    })),
    [events]
  );
  return /* @__PURE__ */ jsx(
    ComboboxInput,
    {
      value,
      onChange,
      placeholder,
      suggestions,
      allowCustomValues: true,
      disabled
    }
  );
}
export {
  EventPatternInput
};
//# sourceMappingURL=EventPatternInput.js.map
