import { jsx as f } from "../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { memo as S } from "../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/compat/dist/compat.module.js";
import { useResponsiveContainer as t, containerQueries as o } from "../../../../../hooks/useResponsiveContainer.js";
import d from "../../../../internal/FormFields/Select/Select.js";
const x = S(
  ({
    placeholder: n,
    selection: i,
    selectionOptions: e,
    updateSelection: s,
    onResetAction: a,
    readonly: r,
    isInvalid: l
  }) => {
    const m = t(o.down.xs), c = t(o.only.sm), u = t(o.only.md);
    return (e && e.length > 1 || r) && /* @__PURE__ */ f(
      d,
      {
        readonly: r,
        isInvalid: l,
        onResetAction: a,
        onChange: s,
        filterable: !1,
        multiSelect: !0,
        placeholder: n,
        selected: i,
        withoutCollapseIndicator: !0,
        items: e ?? [],
        showOverlay: m,
        fitPosition: u || c,
        "aria-label": n
      }
    );
  }
);
export {
  x as default
};
