import { Member, ListMetadata } from '../api/endpoint.js'; import { Elements } from './elements.js'; import '@tanstack/react-query'; import '../api/widgets-api-client.js'; import 'react'; import '@radix-ui/themes'; import '@radix-ui/themes/props'; import '../dialog-CGXwsXVe.js'; import '@radix-ui/themes/components/dialog'; import '../alert-dialog-BMbVcJfZ.js'; import '@radix-ui/themes/components/alert-dialog'; import '../dropdown-menu-BQ5LtvdR.js'; import '@radix-ui/themes/components/dropdown-menu'; import '../select-KR89Qnvm.js'; import '@radix-ui/themes/components/select'; declare const canUseDOM: boolean; declare function getBestName({ firstName, lastName, }: Pick): string | null; declare function getComparativeReadableDate(now: Date, then: Date, options: { locale: string; timeZone?: string; }): string; declare function isObjectLike(value: unknown): value is Record; declare function isErrorLike(value: unknown): value is Record & { message: string; }; declare function isPromiseLike(value: unknown): value is PromiseLike; declare function parseErrorResponse(response: Response): Promise<{ message: string; status: number; }>; declare function namespaceClassNames(...classNames: (string | undefined | null | boolean)[]): string; interface CommonDomArgs { className?: string | undefined | null; dataAttributes?: Record; } interface WidgetRootDomArgs { isWidgetRoot: true; widgetId: string; elementId?: never; widgetState: WidgetRootState; } interface WidgetElementDomArgs { isWidgetRoot?: false; widgetId?: string; elementId?: keyof Elements; widgetState?: never; className: string | undefined | null; } type DomArgs = CommonDomArgs & (WidgetRootDomArgs | WidgetElementDomArgs); type DataAttributeProps = { [K in `data-${string}`]?: string | boolean; }; type DomProps = { className: string | undefined; } & DataAttributeProps; declare function getDomProps(args: DomArgs): DomProps; declare function parseUserAgent(userAgent?: string | null): { pretty: string; isMobile: boolean; }; declare function getUserLocation(location?: { cityName: string; countryISOCode: string; } | null, ipAddress?: string | null): string; declare function unreachable(value: never): never; declare function pluralize(word?: string, amount?: number, showAmount?: boolean): string; interface WidgetRootDomProps { className?: string; } type WidgetRootState = "loading" | "error" | "resolved"; type Pagination = Nullable<{ before: string; after: string; }>; type DeprecatedListMetadataResponse = { listMetadata: Pagination; }; type NewListMetadataResponse = { list_metadata: Pagination; }; declare function getListMetadata(responseObject: T | undefined | null): ListMetadata; type Nullable = { [K in keyof T]?: T[K] | null; }; /** * Opens the Admin Portal via form submission instead of URL query parameters. * This keeps the API token in the request body rather than the URL, * reducing exposure in server logs, browser history, and referrer headers. */ declare function openAdminPortalViaForm(link: string, options?: { target?: string; rel?: string; }): void; export { type Nullable, type WidgetRootDomProps, type WidgetRootState, canUseDOM, getBestName, getComparativeReadableDate, getDomProps, getListMetadata, getUserLocation, isErrorLike, isObjectLike, isPromiseLike, namespaceClassNames, openAdminPortalViaForm, parseErrorResponse, parseUserAgent, pluralize, unreachable };