import { jsx as d } from "react/jsx-runtime";
import { useState as S, useMemo as r, useCallback as f } from "react";
import { a as C } from "./index.CfQlFjZU.js";
import { d as A, e as M } from "./index.dWlEA7uO.js";
import { S as s } from "./shared.EdGf6tcG.js";
import { O as b } from "./OptionCards.vIdeMp4M.js";
import { u as O } from "./shortVideoModule.BlUq1dqv.js";
import { u as h } from "./ItemCreationContext.CFI6PyWk.js";
var k = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.MANUAL = "manual", t))(k || {});
const N = ({
  previousPageUrl: t,
  onCancelClicked: n,
  onNextClicked: i,
  type: a
}) => {
  const [e, c] = S(-1), o = O(a), m = r(() => `Add ${o.platformName} ${o.plural}`, [o]), l = f(() => {
    e !== -1 && i(
      e === 0 ? "automatic" : "manual"
      /* MANUAL */
    );
  }, [e, i]), u = [
    {
      label: "Cancel",
      semantic: s.SECONDARY,
      onClick: n
    },
    {
      label: "Next",
      semantic: s.PRIMARY,
      onClick: l,
      disabled: e === -1
    }
  ], p = r(() => [
    {
      title: o.options.automatic.title,
      description: o.options.automatic.description,
      icon: A,
      onClick: () => {
      }
    },
    {
      title: o.options.manual.title,
      description: o.options.manual.description,
      icon: M,
      onClick: () => {
      }
    }
  ], [a]);
  return h({
    title: m,
    buttons: u,
    previousPageUrl: t
  }), {
    selectedOption: e,
    setSelectedOption: c,
    options: p
  };
}, T = ({
  selectedOption: t,
  setSelectedOption: n,
  options: i
}) => /* @__PURE__ */ d(
  b,
  {
    options: i,
    selectedOption: t,
    onSelect: n
  }
), Y = C(
  T,
  N
);
export {
  k as S,
  Y as a
};
