"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 { ReadScope, AdminScope, WriteScope } from "@/lib/types"; import { MethodType } from "@/lib/types"; import { ControllerRenderProps } from "react-hook-form"; interface ScopeSectionProps { method: MethodType; scopes?: ReadScope[] | WriteScope[] | AdminScope[]; } const ScopeSection: React.FC = ({ method, scopes}) => { return (

{method === "read" && "read your account's data"} {method === "write" && "modify your account's data"} {method === "admin" && "read data on the server"} {method === "follow" && "modify account relationships"} {method === "push" && "receive your push notifications"} {method === "crypto" && "use end-to-end encryption"}

{scopes && ( )}
{scopes && (
{scopes.map((scope) => (
))}
)}
); }; export default ScopeSection;