import type React from "react";
import type { AttioRecord } from "./attio-record.js";
import type { AppPageSlug, RecordTab } from "./register.js";
/**
* A place inside Attio that an app can point the user at. Build one with
* `Destinations` and pass it to `navigate` or
* ``.
*/
export type Destination = {
/**
* Navigates to one of this app's full pages.
*/
type: "app-page";
/**
* The slug of the app page, as declared in the page's definition.
*/
slug: string;
} | {
/**
* Navigates to a record's page.
*/
type: "record";
/**
* The ID of the record.
*/
recordId: string;
/**
* The API slug of the object the record belongs to.
*/
objectSlug: string;
/**
* The record page tab to open. Accepts one of this app's record tab IDs or a
* built-in tab slug (e.g. "activity"). Defaults to the record's overview tab.
*/
tab?: string;
} | {
/**
* Navigates to this app's settings page.
*/
type: "app-settings";
};
/**
* Builders for the destinations that `navigate` and
* `` accept.
*/
export declare const Destinations: {
/**
* A destination pointing at one of this app's full pages.
*
* @param slug - The slug of the app page, as declared in the page's definition.
*/
appPage(slug: AppPageSlug): Destination;
/**
* A destination pointing at a record's page.
*
* @param record - The record to navigate to.
* @param options - Optional settings.
* @param options.tab - The record page tab to open. Accepts one of this app's record
* tab IDs or a built-in tab slug (e.g. "activity"). Defaults to the record's
* overview tab.
*/
record(record: AttioRecord, options?: {
tab?: RecordTab;
}): Destination;
/**
* A destination pointing at this app's settings page.
*/
appSettings(): Destination;
};
/**
* Navigates the user to the given destination inside Attio. Navigation happens in the
* current tab. If the destination cannot be resolved, nothing happens.
*
* @param destination - The destination to navigate to, built with `Destinations`.
*/
export declare function navigate(destination: Destination): void;
/**
* A link to a destination inside Attio. Navigation happens in the current tab. If the
* destination cannot be resolved, the link renders its text without a link.
*/
export declare function AttioLink(props: {
/**
* The destination to link to, built with `Destinations`.
*/
to: Destination;
/**
* The content of the link. Must be a single piece of text.
*/
children?: React.ReactNode;
}): React.JSX.Element;
//# sourceMappingURL=destinations.d.ts.map