import type { CheckAuthorizationWithCustomPermissions, Clerk, ClerkOptions, ClientResource, MultiDomainAndOrProxyPrimitives, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, Without, } from '@clerk/types'; type AstroClerkUpdateOptions = Pick; type AstroClerkIntegrationParams = Without< ClerkOptions, | 'isSatellite' | 'sdkMetadata' | 'standardBrowser' | 'selectInitialSession' | 'routerReplace' | 'routerDebug' | 'routerPush' | 'polling' | 'touchSession' > & MultiDomainAndOrProxyPrimitives; type AstroClerkCreateInstanceParams = AstroClerkIntegrationParams & { publishableKey: string }; // Copied from `@clerk/clerk-react` export interface HeadlessBrowserClerk extends Clerk { load: (opts?: Without) => Promise; updateClient: (client: ClientResource) => void; } // Copied from `@clerk/clerk-react` export interface BrowserClerk extends HeadlessBrowserClerk { onComponentsReady: Promise; components: any; } declare global { interface Window { __astro_clerk_component_props: Map>>; __astro_clerk_function_props: Map>>; Clerk: BrowserClerk; } } type ProtectProps = | { condition?: never; role: OrganizationCustomRoleKey; permission?: never; } | { condition?: never; role?: never; permission: OrganizationCustomPermissionKey; } | { condition: (has: CheckAuthorizationWithCustomPermissions) => boolean; role?: never; permission?: never; } | { condition?: never; role?: never; permission?: never; }; export type { AstroClerkUpdateOptions, AstroClerkIntegrationParams, AstroClerkCreateInstanceParams, ProtectProps }; export type ButtonProps = { /** * @deprecated The `'as'` prop will be removed in a future version. * Use the default slot with the `'asChild'` prop instead. * @example * * * */ as: Tag; asChild?: boolean; }; export type InternalUIComponentId = | 'sign-in' | 'sign-up' | 'create-organization' | 'organization-list' | 'organization-profile' | 'organization-switcher' | 'user-button' | 'user-profile' | 'google-one-tap' | 'waitlist' | 'pricing-table';