"use client"; import { Checkbox } from "@/components/ui/checkbox"; import { ReadScope, AdminScope, WriteScope } from "@/lib/types"; import { readScopes, adminScopes, writeScopes } from "@/lib/utils"; import { MethodType } from "@/lib/types"; import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "@/components/ui/collapsible"; import { ChevronsUpDown } from "lucide-react"; import { Button } from "@/components/ui/button"; interface ScopeSectionProps { method: MethodType; scopes?: ReadScope[] | WriteScope[] | AdminScope[]; } const ScopeSection: React.FC = ({ method, scopes }) => { return (

{method === "read" && "read all your account's data"} {method === "write" && "modify all your account's data"} {method === "admin" && "read all 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) => (
))}
)}
); }; const ScopeInput = (props: any) => { return (
); }; export default ScopeInput;