"use client"; import { Checkbox } from "@/components/ui/checkbox"; import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "@/components/ui/collapsible"; import { Button } from "@/components/ui/button"; import { ChevronsUpDown } from "lucide-react"; import { ScopeInfo } from "./InputForm"; import ScopeCheckbox from "./ScopeCheckbox"; interface ScopeSectionProps { info: ScopeInfo; field: any; } const ScopeSection: React.FC = ({ info, field }) => { const { method, description, scopes } = info; return (

{description}

{scopes && ( )}
{scopes && (
{method === "admin" ? (scopes as string[][]).map((items) => (
{items.map((item) => ( ))}
)) : (scopes as string[]).map((scope) => ( ))}
)}
); }; export default ScopeSection;