import { jsxs as u, jsx as n } from "@emotion/react/jsx-runtime";
import { useModuleDictionary as p } from "@m4l/core";
import { getDynamicSortDictionary as f, DICCTIONARY as y } from "../../dictionary.js";
import C from "../DynamicSortBase/useDynamicSortBase.js";
import D from "./useSortActions.js";
import { ActionsStyled as A, ActionsClearButtonStyled as d, ActionsSubmitButtonStyled as w } from "../../slots/DynamicSortSlots.js";
function R() {
  const {
    sortIconUrl: c,
    clearIconUrl: l,
    canShowRemoveAction: o,
    onClickClearSorts: s,
    onClickSort: a,
    sortButtonDictionaryTooltip: m,
    ownerState: t
  } = D(), { size: r, visibleRefresh: i, ownerState: { isDirty: S } } = C(), { getLabel: e } = p();
  return /* @__PURE__ */ u(A, { ownerState: { ...t, isDirty: o, visibleRefresh: i }, children: [
    o && /* @__PURE__ */ n(
      d,
      {
        size: r,
        icon: l,
        onClick: s,
        tooltip: e(f(y.tooltip_clear_sort))
      }
    ),
    i ? /* @__PURE__ */ n(
      w,
      {
        size: r,
        icon: c,
        "aria-label": "refresh",
        tooltip: e(m),
        onClick: a,
        ownerState: { ...t, isDirty: S }
      }
    ) : null
  ] });
}
export {
  R as default
};
