import {
  curriculum_sidebar_item_wrapper_default
} from "./chunk-FC4SRBTF.js";
import {
  section_item_default
} from "./chunk-KCC3DAOY.js";
import {
  section_title_default
} from "./chunk-4TST4UK5.js";
import {
  getCurriculumIconColor
} from "./chunk-JF7JAMOQ.js";
import {
  __spreadProps,
  __spreadValues
} from "./chunk-CRTRMMJ7.js";

// src/molecules/curriculumV2/CurriculumSidebar/sidebar-item.tsx
import { jsx } from "react/jsx-runtime";
function SidebarItem({ item, selectedIndex, setSelectedIndex, index, done }) {
  if (item.type === "sectionTitle") {
    return /* @__PURE__ */ jsx(section_title_default, __spreadValues({}, item), item.uuid);
  }
  const isSelected = selectedIndex === index;
  return /* @__PURE__ */ jsx(
    curriculum_sidebar_item_wrapper_default,
    {
      index,
      isSelected,
      onClick: () => {
        setSelectedIndex(index);
      },
      children: /* @__PURE__ */ jsx(
        section_item_default,
        __spreadProps(__spreadValues({}, item), {
          color: getCurriculumIconColor({
            done,
            selected: isSelected
          })
        })
      )
    },
    item.uuid
  );
}
var sidebar_item_default = SidebarItem;

export {
  sidebar_item_default
};
//# sourceMappingURL=chunk-2EBEHUVU.js.map