import { jsxs, jsx } from "react/jsx-runtime";
import { useContext } from "react";
import { S as SortableContext } from "../../sortable.esm-CQM3vY1X.js";
import { c as cn } from "../../cn-FAaWYZ6x.js";
import { ScrollArea, ScrollBar } from "../scroll-area/scroll-area.js";
import { KanbanContext } from "./kanban-context.js";
const KanbanCards = ({
  children,
  className,
  ...props
}) => {
  const { data } = useContext(KanbanContext);
  const filteredData = data.filter((item) => item.column === props.id);
  const items = filteredData.map((item) => item.id);
  return /* @__PURE__ */ jsxs(ScrollArea, { className: "flex-1 min-h-0 overflow-hidden", children: [
    /* @__PURE__ */ jsx(SortableContext, { items, children: /* @__PURE__ */ jsx(
      "div",
      {
        className: cn("flex flex-grow flex-col gap-2 p-3", className),
        ...props,
        children: filteredData.map((item) => children(item))
      }
    ) }),
    /* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" })
  ] });
};
export {
  KanbanCards
};
