import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { PartialProfile, Profile, ProfileProvider } from 'tabby-core'; export type ProfileModalVerdict = /** Both inputs are there under the names this file assigns. */ 'ok' /** Angular would not say — never treated as a failure. */ | 'unknown' /** Angular listed the component's inputs, and at least one of ours is gone. */ | 'missing'; /** Shown to the user when the modal is refused. */ export declare const PROFILE_MODAL_UNAVAILABLE = "La fen\u00EAtre de profil de Tabby a chang\u00E9 \u2014 cr\u00E9ation et \u00E9dition de profils indisponibles sur cette version"; /** * Asks Angular what inputs the host's modal actually declares. * * `reflectComponentType()` is public API (`@publicApi`, since 14.1), which the * `ɵcmp.inputs` route this was first sketched as is not — reading a `ɵ`-prefixed * field to guard against an unstable field would have shared the nature of the * thing it guards. Verified at both levels the way piège #13 requires: declared * in the npm typings of Angular 15.2.10, and present as an exported * `function reflectComponentType` in the bundle Tabby actually loads. * * **Read `propName`, never `templateName`** — and do not take Angular's own * documentation for it, whose example has the two the wrong way round. The * implementation (`toRefArray` over the table `invertObject` built) puts the * property name in `propName` and the public name in `templateName`, and the * distinction is the whole point here: the modal declares * `@Input('profile') partialProfile`, so it is `profile` that keys the raw * table. A check written against `templateName` — or against `ɵcmp.inputs` * directly — would look for `partialProfile` where the string `profile` sits, * and would have failed on a perfectly healthy Tabby, every single start. * Measured on the installed app: `[['partialProfile', 'profile'], * ['profileProvider', 'profileProvider'], …]`. */ export declare function checkProfileModalInputs(): ProfileModalVerdict; /** * Opens the host's profile modal, or refuses to. * * Refusing is the point: an empty modal is a dead end the user cannot read, * while `null` here becomes a message that names what happened. Only a settled * `missing` refuses — an `unknown` verdict opens, because "Angular would not * say" is not evidence of anything and the modal very probably works. * * This is the same call `tabby-core` makes for the native profile sidebar * (`profileTree.component.ts`, `editProfile()`) and `tabby-settings` for its own * list. Not a contract — none of it is exported — but a rename would break Tabby * in two of its own plugins first. */ export declare function openProfileModal(ngbModal: NgbModal, partialProfile: PartialProfile, provider: ProfileProvider): NgbModalRef | null;