"use client"; import { TbChevronDown } from "react-icons/tb"; import classNames from "classnames"; import { API_COLLECTIONS } from "@/utils/datas/api_collections"; import { Method } from "@/components/method"; import { ApiRoute } from "@/utils/type"; import Link from "next/link"; export const EditorSidebar = ({ collections, endpoint, onCollections, onEndpoint, }: { collections: string[]; endpoint: ApiRoute | null; onCollections: (collections: string[]) => void; onEndpoint: (endpoint: ApiRoute) => void; }) => { const handleSetActiveCollection = (key: string) => { if (collections.includes(key)) { onCollections(collections.filter((col) => col !== key)); } else { onCollections([...collections, key]); } }; return ( ); };