import { jsx, jsxs } from "react/jsx-runtime";
import { ChatChannelItem } from "./ChatChannelItem.js";
const ChatChannelList = ({
  channels,
  selectedChannelOrChatId,
  onChannelSelect,
  showChannelList,
  showCheckbox,
  handleChatSelect,
  selectedChat = [],
  onPinnedChatClick,
  handleToast
}) => {
  return /* @__PURE__ */ jsx("div", { className: "chat-channel-list", children: Array.isArray(channels) && channels.length > 0 ? channels.map((channel, index) => /* @__PURE__ */ jsx(
    ChatChannelItem,
    {
      ...channel,
      handleChatSelect,
      handleToast,
      isSelected: channel.id === selectedChannelOrChatId,
      selectedChat,
      showChannelList,
      showCheckbox,
      onClick: (e) => onChannelSelect(channel == null ? void 0 : channel.id, channel),
      onPinnedChatClick
    },
    `${channel.id}-${index}`
  )) : /* @__PURE__ */ jsxs("div", { className: "no-channels-found-container", children: [
    /* @__PURE__ */ jsx("p", { className: "no-channels-found", children: "No channels found" }),
    /* @__PURE__ */ jsx("p", { className: "no-channels-found-description", children: "No channels found. Please create a new channel to get started." })
  ] }) });
};
export {
  ChatChannelList
};
