import { Combobox, ComboboxItem, ComboboxPopover, ComboboxProvider, } from "@ariakit/react" import dynamic from "next/dynamic" import { Link } from "@/components/Link" import manifest from "@/data/manifest.json" import { PreviewProviders, type Provider, } from "@/components/SearchBarProviders/PreviewProviders" import { useSelectCombobox } from "@/hooks/use-select-combobox" const OAuthProviderInstructions = dynamic(() => import("./content").then((mod) => mod.OAuthInstructions) ) const previewProviders: Provider[] = [ { id: "google", name: "Google" }, { id: "github", name: "GitHub" }, { id: "twitter", name: "Twitter" }, { id: "keycloak", name: "Keycloak" }, { id: "okta", name: "Okta" }, ] const items = Object.entries(manifest.providersOAuth).map(([id, name]) => ({ id, name, })) export function OAuthProviderSelect() { const { selectedItem, filteredItems, hasMatchItem, handleChange, handleSelect, } = useSelectCombobox({ items, }) return (
{filteredItems.map((item) => ( handleSelect(item)} > {" "} {item.name} ))} {!selectedItem.name && ( <>

Or jump directly to one of the popular ones below.

)} {!hasMatchItem && filteredItems.length === 0 && (

Can't find the OAuth provider you're looking for? You can always{" "} build your own .

)}
{hasMatchItem && ( )}
) }