import { App, ILinkedResource } from '@edifice.io/client'; /** * Definition of an internal link. */ type ApplicationOption = { /** Icon to display */ icon?: JSX.Element; /** Application code */ application: string; /** Display name */ displayName: string; }; /** * Properties for the InternalLinker react component. */ export interface InternalLinkerProps { /** Currently running application */ appCode: App; /** When defined, preloads and displays this type of resources. */ defaultAppCode?: App | null; /** When defined, selects this resource (defaultApp must be specified) */ defaultResourceId?: string | null; /** Notify when the user selects an application in the dropdown */ onChange?: (application?: ApplicationOption) => void; /** Notify when resources selection changes */ onSelect?: (resources: ILinkedResource[]) => void; /** Whether to allow multiple resources selection */ multiple: boolean | undefined; /** List of resources to display */ resourceList?: ILinkedResource[]; /** List of applications to display */ applicationList?: ApplicationOption[]; /** Whether to show the application selector */ showApplicationSelector?: boolean; /** Disable application selecetor */ disableApplicationSelector?: boolean; /** Optional callback to filter resources after loading. Applied in addition to search filters. */ resourceFilter?: (resource: ILinkedResource) => boolean; /** * When provided, replaces the built-in search/load logic entirely. * Called with the current search terms and selected application whenever the search changes. * The returned resources are displayed as-is (no additional filtering or sorting). */ onSearch?: (search: string, application?: ApplicationOption) => Promise; /** When true, a "load more" button is shown. The caller controls this flag. */ hasMoreResources?: boolean; /** Called when the user clicks the "load more" button. */ onLoadMore?: () => void; /** Label for the "load more" button. Defaults to the `bbm.linker.see.more` i18n key. */ loadMoreLabel?: string; } export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector, disableApplicationSelector, resourceFilter, onSearch, hasMoreResources, onLoadMore, loadMoreLabel, }: InternalLinkerProps) => import("react/jsx-runtime").JSX.Element; export default InternalLinker;