import { jsx as s } from "@emotion/react/jsx-runtime";
import { normalizeCheckableListPropsFromBackend as k } from "./normalizeCheckableListPropsFromBackend.js";
import { resolveFieldHelperMessage as v, resolveFieldMandatory as y } from "../../../resolveFieldContractAliases.js";
import { DynamicFormCheckableListWrapperStyled as u } from "../../../../slots/DynamicFormSlots.js";
import { RHFCheckableList as C } from "../../../../../hook-form/RHFCheckableList/RHFCheckableList.js";
const I = {
  componentIds: ["RHFCheckableList"],
  /** Renders the RHFCheckableList component for the given field and context. */
  render(o) {
    const { field: e, props: a } = o, { size: l = "medium", disabled: t, readOnly: i, getLabel: d, suppressLabel: m } = a, { name: n } = e, c = v(e), p = y(e), b = k(e, d), {
      groups: h,
      resolvedLabel: L,
      hasGroups: r,
      resolvedSearchable: F,
      resolvedCheckableListItems: f,
      ...g
    } = b;
    return /* @__PURE__ */ s(u, { children: /* @__PURE__ */ s(
      C,
      {
        name: n,
        size: l,
        ...!m && { label: L ?? "", mandatory: p },
        items: r ? void 0 : f,
        groups: r ? h : void 0,
        helperMessage: c || "",
        disabled: t || i,
        searchable: F ?? !1,
        ...g
      }
    ) });
  }
};
export {
  I as checkableListStrategy
};
