import { jsx as e, Fragment as d, jsxs as o } from "react/jsx-runtime";
import { a as g } from "./index.CfQlFjZU.js";
import { l as h } from "./index.C1ZfizMq.js";
import { P as T } from "./Page.DxkgZw21.js";
import { a as _, g as i, d as s } from "./GridRow._ehOXG8R.js";
import "./GridLayouts.DSIvKCIo.js";
import { P as f } from "./PageHeader.BwFpx_pz.js";
import { P } from "./PageSection.DaF45FbK.js";
import { a as N } from "./ChipFilter.4oJ283mr.js";
import { T as L } from "./TemplateList.CAhARZZU.js";
const S = "creator_emailTemplateListWrapper_NT-aI", u = "creator_pageHeader_gMZMf", v = "creator_headerSection_B9rO8", W = "creator_sectionTitle_BDxPj", x = "creator_categories_o-SGs", y = "creator_category_0W5cO", G = "creator_templatesSection_Tv3TV", a = { emailTemplateListWrapper: S, pageHeader: u, headerSection: v, sectionTitle: W, categories: x, category: y, templatesSection: G }, H = ({
  ...r
}) => ({ ...r }), j = ({
  previousPageURL: r,
  templateCategories: c,
  templates: l,
  isPageLoading: m = !1,
  onCategoryClick: n,
  onTemplateSelect: p
}) => /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(
  T,
  {
    isLoading: m,
    className: a.emailTemplateListWrapper,
    children: /* @__PURE__ */ o(_, { children: [
      /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(s, { className: a.pageHeader, children: /* @__PURE__ */ e(
        f,
        {
          title: "New template",
          previousPageUrl: r
        }
      ) }) }),
      /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(s, { className: a.headerSection, children: /* @__PURE__ */ o(P, { children: [
        /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("span", { className: a.sectionTitle, children: "What is your goal?" }) }),
        /* @__PURE__ */ e("div", { className: a.categories, children: /* @__PURE__ */ e(
          h,
          {
            values: c,
            layout: (t) => /* @__PURE__ */ e("div", { className: a.category, children: /* @__PURE__ */ e(
              N,
              {
                ...t,
                onClick: () => {
                  t.id && n(t.id);
                }
              }
            ) })
          }
        ) })
      ] }) }) }),
      /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(s, { className: a.templatesSection, children: /* @__PURE__ */ e(
        L,
        {
          templates: l,
          onTemplateSelect: p
        }
      ) }) })
    ] })
  }
) }), I = g(
  j,
  H
);
export {
  I as E
};
