import { j as t } from "../../../../_virtual/jsx-runtime.js";
import { HeaderWrapper as x, HeaderInnerWrapper as j, IconTitleWrapper as h } from "./styles.js";
import { IconButton as u } from "../../../IconButton/index.js";
import I from "../../../../icons/Close.js";
import f from "../../../../icons/Placeholder.js";
import { getId as p } from "../../../../utils/index.js";
function W({
  headerTitle: s,
  icon: d = /* @__PURE__ */ t.jsx(f, {}),
  hasPullTab: c = !1,
  pinnedHeader: m = !1,
  headerContentModifiers: e = "empty",
  headerControlsModifiers: a = "close",
  onClose: l,
  ...r
}) {
  const o = p(`${r["data-testid"]}-bottom-sheet-header`), i = p(`${r["data-trackid"]}-bottom-sheet-header`), n = p(`${r.id}`);
  return /* @__PURE__ */ t.jsx(
    x,
    {
      hasPullTab: c,
      pinnedHeader: m,
      "data-testid": o("wrapper"),
      id: n("wrapper"),
      children: e === "empty" && a === "default" ? null : /* @__PURE__ */ t.jsxs(j, { headerContentModifiers: e, children: [
        /* @__PURE__ */ t.jsxs(h, { headerControlsModifiers: a, children: [
          e === "withIcon" && d,
          e !== "empty" && /* @__PURE__ */ t.jsx("h3", { "data-testid": o("title"), children: s })
        ] }),
        a === "close" && /* @__PURE__ */ t.jsx(
          u,
          {
            size: "x-small",
            variant: "ghost-tertiary",
            icon: /* @__PURE__ */ t.jsx(I, {}),
            onClick: l,
            "data-testid": o("close-button"),
            "data-trackid": i("close-button")
          }
        )
      ] })
    }
  );
}
export {
  W as BottomSheetHeader
};
