import { jsx as e, jsxs as g } from "react/jsx-runtime";
import { useMemo as v } from "react";
import { a as w } from "./index.CfQlFjZU.js";
import { P } from "./PageHeader.BwFpx_pz.js";
import { a as h, g as C, d as s } from "./GridRow._ehOXG8R.js";
import "./GridLayouts.DSIvKCIo.js";
import { M as _ } from "./MessagesSection.WohHx3oV.js";
import { T as b } from "./TableSection.B8U91gX_.js";
import { B as N } from "./ButtonSection.B8De7wLs.js";
const x = "creator_reviewPageWrapper_-2QL-", M = "creator_tableCol_tsT2k", R = "creator_footerCol_MOdjL", m = { reviewPageWrapper: x, tableCol: M, footerCol: R }, S = (o) => {
  const { userTags: a, maximumAllowedTagsCount: r, totalTagCount: i } = o, t = i - r, l = t > 0, n = v(() => a.filter((c) => !c.is_active), [a]);
  return {
    ...o,
    inactiveTags: n,
    overflowTagsCount: t,
    hasTooManyTags: l,
    wrapperClassName: m.reviewPageWrapper,
    tableColClassName: m.tableCol,
    footerColClassName: m.footerCol
  };
}, j = ({
  maximumAllowedTagsCount: o,
  overflowTagsCount: a,
  hasTooManyTags: r,
  inactiveTags: i,
  previousPageURL: t,
  isSaveLoading: l = !1,
  totalTagCount: n,
  onCustomTagDeleteClick: c,
  onCancelClick: d,
  onSaveClick: p,
  wrapperClassName: u,
  tableColClassName: f,
  footerColClassName: T
}) => /* @__PURE__ */ e("div", { className: u, children: /* @__PURE__ */ g(h, { children: [
  /* @__PURE__ */ g(C, { children: [
    /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(P, { title: "Review tags", previousPageUrl: t }) }),
    /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(
      _,
      {
        maximumAllowedTagsCount: o,
        hasTooManyTags: r,
        extraTagsCount: a,
        totalTagsCount: n
      }
    ) }),
    /* @__PURE__ */ e(s, { className: f, children: /* @__PURE__ */ e(
      b,
      {
        data: i,
        onCustomTagDeleteClick: c
      }
    ) })
  ] }),
  /* @__PURE__ */ e(C, { className: T, children: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(
    N,
    {
      isSaveDisabled: r,
      isSaveLoading: l,
      onSaveClick: p,
      onCancelClick: d
    }
  ) }) })
] }) }), H = w(
  j,
  S
);
export {
  H as C
};
