import { Member, ListMetadata } from '../api/endpoint.cjs';
import { Elements } from './elements.cjs';
import '@tanstack/react-query';
import '../api/widgets-api-client.cjs';
import 'react';
import '@radix-ui/themes';
import '@radix-ui/themes/props';
import '../dialog-CGXwsXVe.cjs';
import '@radix-ui/themes/components/dialog';
import '../alert-dialog-BMbVcJfZ.cjs';
import '@radix-ui/themes/components/alert-dialog';
import '../dropdown-menu-BQ5LtvdR.cjs';
import '@radix-ui/themes/components/dropdown-menu';
import '../select-KR89Qnvm.cjs';
import '@radix-ui/themes/components/select';

declare const canUseDOM: boolean;
declare function getBestName({ firstName, lastName, }: Pick<Member, "firstName" | "lastName">): string | null;
declare function getComparativeReadableDate(now: Date, then: Date, options: {
    locale: string;
    timeZone?: string;
}): string;
declare function isObjectLike(value: unknown): value is Record<string, unknown>;
declare function isErrorLike(value: unknown): value is Record<string, unknown> & {
    message: string;
};
declare function isPromiseLike(value: unknown): value is PromiseLike<unknown>;
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<string, string | boolean | undefined | null>;
}
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<T extends DeprecatedListMetadataResponse | NewListMetadataResponse>(responseObject: T | undefined | null): ListMetadata;
type Nullable<T> = {
    [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 };
