import { jsx as o, jsxs as h, Fragment as y } from "react/jsx-runtime";
import { a as v } from "./index.CfQlFjZU.js";
import { l as x } from "./index.C1ZfizMq.js";
import { a as B } from "./ChipFilter.4oJ283mr.js";
import { a as b, B as G } from "./Button.CpTwUWVr.js";
import { B as S } from "./ButtonGroup.GFy-lPs3.js";
import { n as k } from "./index.B0wX8xO7.js";
import { F as g } from "./form.BJJLcx4p.js";
import { O as I } from "./Onboarding.BDRBUM0D.js";
import { a as F } from "./breakpoint.DipDapki.js";
import "react";
import "./ProgressActivity.DYLCzf8q.js";
import "./formInputIcon.module.CU3tuFAI.js";
import "./isEqual.Bk3xqtBB.js";
const T = "creator_contentContainerStretch_a0XL5", U = "creator_mainContentContainer_eSx21", w = "creator_formContainer_SzCFU", z = "creator_sectionFormContainer_FNUZg", L = "creator_header_HfIY4", P = "creator_body_CGUyi", V = "creator_radioGroup_m-sKj", j = "creator_radioGroupV1_kmTpT", t = { contentContainerStretch: T, mainContentContainer: U, formContainer: w, sectionFormContainer: z, header: L, body: P, radioGroup: V, radioGroupV1: j };
function O({
  industries: c,
  onSelect: p,
  selectedKey: e,
  onSubmit: d,
  loading: a,
  shouldRemoveForm: n,
  title: i,
  subtitle: s,
  isCategoryFFOn: l
}) {
  function u(m) {
    m.preventDefault(), d();
  }
  const f = !F("sm");
  return {
    industries: c,
    onSelect: p,
    selectedKey: e,
    onSubmit: u,
    loading: a,
    formContainerClassName: t.formContainer,
    headerClassName: t.header,
    bodyClassName: t.body,
    radioGroupClassName: l ? t.radioGroupV1 : t.radioGroup,
    isNativeForm: !n,
    title: i || "What type of content do you create?",
    subtitle: s || `Choose one that best describes you for a personalized Komi
    experience.`,
    isCategoryFFOn: l,
    nextButton: [
      {
        label: "Next",
        size: "full",
        type: b.SUBMIT,
        disabled: !e,
        loading: a
      }
    ],
    showFloatingButton: f
  };
}
function M({
  industries: c,
  onSelect: p,
  selectedKey: e,
  onSubmit: d,
  loading: a,
  formContainerClassName: n,
  headerClassName: i,
  bodyClassName: s,
  radioGroupClassName: l,
  isNativeForm: u,
  title: C,
  subtitle: f,
  isCategoryFFOn: m,
  nextButton: _,
  showFloatingButton: N
}) {
  return /* @__PURE__ */ o(I, { layout: "column", children: /* @__PURE__ */ h(
    g,
    {
      isNative: u,
      formProps: {
        className: n,
        onSubmit: d
      },
      divProps: { className: n },
      children: [
        /* @__PURE__ */ h("div", { children: [
          /* @__PURE__ */ o("h1", { className: i, children: C }),
          /* @__PURE__ */ o("p", { className: s, children: f })
        ] }),
        /* @__PURE__ */ o("div", { role: "radiogroup", className: l, children: /* @__PURE__ */ o(
          x,
          {
            values: c,
            layout: (r) => /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
              B,
              {
                role: "radio",
                name: "industry",
                value: r.key,
                label: r.label,
                onClick: () => p(r.key),
                selected: r.key === e,
                "aria-checked": r.key === e,
                prefixIcon: m ? r?.icon : null
              }
            ) }, r.key)
          }
        ) }),
        /* @__PURE__ */ o(
          k,
          {
            value: m,
            then: /* @__PURE__ */ h(y, { children: [
              /* @__PURE__ */ o("div", { style: { flexGrow: 1 } }),
              /* @__PURE__ */ o(S, { floating: N, buttons: _ })
            ] }),
            otherwise: /* @__PURE__ */ o(
              G,
              {
                label: "Next",
                size: "full",
                disabled: !e,
                type: b.SUBMIT,
                loading: a
              }
            )
          }
        )
      ]
    }
  ) });
}
const oo = v(M, O);
export {
  oo as I
};
