import { Plus } from 'lucide-react' import Link from 'next/link' import { Button, cn, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ScrollArea, } from 'ui' import { OrgCommandItem } from './OrgCommandItem' import type { Organization } from '@/types' export interface OrganizationDropdownCommandContentProps { embedded: boolean className?: string organizations: Organization[] selectedSlug: string | undefined routePathname: string hasRouteSlug: boolean organizationCreationEnabled: boolean onClose: () => void } export function OrganizationDropdownCommandContent({ embedded, className, organizations, selectedSlug, routePathname, hasRouteSlug, organizationCreationEnabled, onClose, }: OrganizationDropdownCommandContentProps) { const orgList = ( <> {organizations?.map((org) => ( ))} > ) if (embedded) { return ( All Organizations {organizationCreationEnabled && ( } > New organization )} No organizations found {orgList} ) } return ( No organizations found 7 ? 'md:h-[210px]' : ''}> {orgList} onClose()}> All Organizations {organizationCreationEnabled && ( <> onClose()}> New organization > )} ) }
New organization