import { jsx as e } from "@emotion/react/jsx-runtime";
import { isValidElement as d, cloneElement as m } from "react";
import { Chip as p } from "../../../Chip/Chip.js";
import f from "../DynamicSortBase/useDynamicSortBase.js";
import u from "./useAppliedSortChip.js";
import { Icon as h } from "../../../Icon/Icon.js";
function E(t) {
  const { fixed: n } = t, { onEditSort: r, onDelete: l, iconFieldUrl: o, labels: c, SortDirectionIcon: a } = u(t), { size: i } = f(), s = d(o) ? m(o, {
    size: i,
    color: "chips.default.contained.color"
  }) : o;
  return /* @__PURE__ */ e(
    p,
    {
      opacity: !0,
      variant: "contained",
      onClick: r,
      startIcon: s,
      label: c.labelField,
      endIcon: /* @__PURE__ */ e(h, { size: "small", src: /* @__PURE__ */ e(a, {}), color: "chips.default.contained.color" }),
      size: i,
      onDeleted: n ? void 0 : l
    }
  );
}
export {
  E as default
};
