import { Locator, Page } from '@playwright/test';
/**
 * LTI tab helpers — Playwright bindings for the `AgentLtiTab` component from
 * `@iblai/web-containers`.
 *
 * The LTI tab is a peer top-level tab in the Edit Mentor (Agent) dialog with
 * four sub-tabs: Links, Keys, Tools, and Tool Endpoints. It only renders when
 * the agent is LTI-accessible (`is_lti_accessible`), so navigation helpers
 * return `false` rather than throwing when the tab is absent.
 *
 * SELECTOR POLICY: every locator below resolves via a stable `data-testid`,
 * an `aria-label`, or an accessible role+name (tab / button / menuitem /
 * heading text). No CSS class or structural selectors are used, so these
 * helpers survive styling changes.
 *
 * The helpers assume the Edit Mentor dialog is already open. Call
 * `switchToLtiTab(page)` first; most helpers accept either the `Page` or the
 * dialog `Locator` as `scope`.
 */
export declare const LTI_LABELS: {
    /** Left-sidebar tab name. */
    readonly tabName: "LTI";
    readonly header: {
        readonly title: "LTI";
        readonly description: "Manage LTI agent links, signing keys, tools, and platform endpoints.";
    };
    readonly subTabs: {
        readonly agentLinks: "Links";
        readonly keys: "Keys";
        readonly tools: "Tools";
        readonly toolEndpoints: "Tool Endpoints";
    };
    readonly modals: {
        readonly createLink: "Create LTI Link";
        readonly editLink: "Edit LTI Link";
        readonly createKey: "Create LTI Key";
        readonly keyDetail: "LTI Key";
        readonly deleteKey: "Delete LTI Key";
        readonly createTool: "Create LTI Tool";
        readonly editTool: "Edit LTI Tool";
    };
    readonly buttons: {
        readonly createLink: "Create LTI Link";
        readonly createKey: "Create LTI Key";
        readonly createTool: "Create LTI Tool";
        /** Confirm button inside the delete-key modal. */
        readonly deleteKey: "Delete";
        readonly edit: "Edit";
        readonly delete: "Delete";
        readonly cancel: "Cancel";
        readonly close: "Close";
        readonly save: "Save";
        readonly create: "Create";
    };
    readonly empty: {
        readonly links: "No LTI link yet for this agent.";
        readonly keys: "No LTI keys yet.";
        readonly tools: "No LTI tools yet.";
    };
};
/** data-testid values rendered by the LTI components. */
export declare const LTI_TEST_IDS: {
    readonly tabBody: "lti-tab-body";
    readonly subTabs: "lti-sub-tabs";
    readonly subTab: {
        readonly agentLinks: "lti-sub-tab-agent-links";
        readonly keys: "lti-sub-tab-keys";
        readonly tools: "lti-sub-tab-tools";
        readonly toolEndpoints: "lti-sub-tab-tool-endpoints";
    };
    readonly links: {
        readonly section: "lti-links-section";
        readonly createButton: "lti-link-create-button";
        readonly empty: "lti-links-empty";
        readonly row: "lti-link-row";
        readonly modal: "lti-link-modal";
        readonly nameInput: "lti-link-name-input";
    };
    readonly keys: {
        readonly section: "lti-keys-section";
        readonly createButton: "lti-key-create-button";
        readonly empty: "lti-keys-empty";
        readonly row: "lti-key-row";
        readonly createModal: "lti-key-create-modal";
        readonly createNameInput: "lti-key-name-input";
        readonly detailModal: "lti-key-detail-modal";
        readonly detailNameInput: "lti-key-detail-name-input";
        readonly publicKey: "lti-key-public-key";
        readonly publicJwk: "lti-key-public-jwk";
        readonly deleteModal: "lti-key-delete-modal";
    };
    readonly tools: {
        readonly section: "lti-tools-section";
        readonly createButton: "lti-tool-create-button";
        readonly empty: "lti-tools-empty";
        readonly row: "lti-tool-row";
        readonly modal: "lti-tool-modal";
        readonly titleInput: "lti-tool-title-input";
        readonly issuerInput: "lti-tool-issuer-input";
        readonly clientIdInput: "lti-tool-client-id-input";
        readonly authLoginInput: "lti-tool-auth-login-input";
        readonly authTokenInput: "lti-tool-auth-token-input";
        readonly authAudienceInput: "lti-tool-auth-audience-input";
        readonly keySetModeUrl: "lti-tool-keyset-mode-url";
        readonly keySetModeRaw: "lti-tool-keyset-mode-raw";
        readonly jwksUrlInput: "lti-tool-jwks-url-input";
        readonly jwksJsonInput: "lti-tool-jwks-json-input";
        readonly keySelect: "lti-tool-key-select";
        readonly deploymentIdsInput: "lti-tool-deployment-ids-input";
    };
    readonly endpoints: {
        readonly redirectUri: "lti-endpoint-redirect-uri";
        readonly login: "lti-endpoint-login";
        readonly deepLinking: "lti-endpoint-deep-linking";
        readonly jwks: "lti-endpoint-jwks";
        readonly url: "lti-endpoint-url";
    };
};
export type LtiSubTab = keyof typeof LTI_TEST_IDS.subTab;
export type LtiEndpoint = 'redirectUri' | 'login' | 'deepLinking' | 'jwks';
export type LtiKeySetMode = 'url' | 'raw';
/** Fields accepted by `createTool` / `editTool`. */
export interface LtiToolFormData {
    title: string;
    issuer: string;
    clientId: string;
    authLoginUrl: string;
    authTokenUrl: string;
    authAudience?: string;
    /** Defaults to 'url'. */
    keySetMode?: LtiKeySetMode;
    /** Required when keySetMode === 'url'. */
    jwksUrl?: string;
    /** Required when keySetMode === 'raw' (raw JWKS JSON string). */
    jwksJson?: string;
    /** Name of the signing key to pick from the dropdown. */
    signingKeyName: string;
    /** Deployment ids; joined with newlines into the textarea. */
    deploymentIds?: string[];
}
/**
 * Whether the LTI tab is currently available in the Edit Mentor dialog.
 * Returns `false` instead of throwing (the tab is hidden unless the agent is
 * LTI-accessible).
 */
export declare function isLtiTabVisible(page: Page): Promise<boolean>;
/**
 * Switch to the LTI tab. Assumes the Edit Mentor dialog is open. Waits for the
 * sub-tab bar to be interactive before returning.
 */
export declare function switchToLtiTab(page: Page): Promise<void>;
/** Locator for a sub-tab trigger. */
export declare function getLtiSubTab(scope: Page | Locator, subTab: LtiSubTab): Locator;
/** Switch to one of the four LTI sub-tabs and wait for it to become active. */
export declare function switchToLtiSubTab(page: Page, subTab: LtiSubTab): Promise<void>;
export declare function expectLtiHeader(scope: Page | Locator): Promise<void>;
export declare function getLinksSection(scope: Page | Locator): Locator;
/** The "Create LTI Link" button (only shown when no link exists yet). */
export declare function getCreateLinkButton(scope: Page | Locator): Locator;
export declare function getLinksEmptyState(scope: Page | Locator): Locator;
/** A link row located by its visible name. */
export declare function getLinkRow(scope: Page | Locator, name: string): Locator;
/** The per-row "Edit <name>" pencil button. */
export declare function getLinkEditButton(scope: Page | Locator, name: string): Locator;
/** The "Copy target link URI" button shown in a link row. */
export declare function getLinkCopyTargetUriButton(scope: Page | Locator): Locator;
export declare function getLinkModal(scope: Page | Locator): Locator;
export declare function getLinkNameInput(scope: Page | Locator): Locator;
export declare function openCreateLinkModal(scope: Page | Locator): Promise<void>;
export declare function openEditLinkModal(scope: Page | Locator, name: string): Promise<void>;
/** Type a name into the (already-open) link modal. */
export declare function fillLinkName(scope: Page | Locator, name: string): Promise<void>;
export declare function submitLinkModal(scope: Page | Locator): Promise<void>;
/** Full create-link flow. */
export declare function createLink(scope: Page | Locator, name: string): Promise<void>;
/** Full rename-link flow (opens via the row's edit pencil). */
export declare function editLink(scope: Page | Locator, currentName: string, newName: string): Promise<void>;
export declare function expectLinksEmpty(scope: Page | Locator): Promise<void>;
export declare function expectLinkInList(scope: Page | Locator, name: string): Promise<void>;
export declare function expectLinkNotInList(scope: Page | Locator, name: string): Promise<void>;
export declare function expectLinkTargetUri(scope: Page | Locator, name: string, targetUri: string): Promise<void>;
export declare function getKeysSection(scope: Page | Locator): Locator;
export declare function getCreateKeyButton(scope: Page | Locator): Locator;
export declare function getKeysEmptyState(scope: Page | Locator): Locator;
export declare function getKeyRow(scope: Page | Locator, name: string): Locator;
/** The per-row three-dots "Actions for <name>" menu trigger. */
export declare function getKeyActionsTrigger(scope: Page | Locator, name: string): Locator;
/** Open a key's three-dots menu and return the open menu (portal-rendered). */
export declare function openKeyActionsMenu(scope: Page | Locator, name: string): Promise<Locator>;
export declare function getKeyCreateModal(scope: Page | Locator): Locator;
export declare function getKeyCreateNameInput(scope: Page | Locator): Locator;
export declare function openCreateKeyModal(scope: Page | Locator): Promise<void>;
export declare function createKey(scope: Page | Locator, name: string): Promise<void>;
export declare function getKeyDetailModal(scope: Page | Locator): Locator;
export declare function getKeyDetailNameInput(scope: Page | Locator): Locator;
export declare function getKeyPublicKeyField(scope: Page | Locator): Locator;
export declare function getKeyPublicJwkField(scope: Page | Locator): Locator;
/** Open the detail (edit) modal for a key via its actions menu → Edit. */
export declare function openKeyDetail(scope: Page | Locator, name: string): Promise<void>;
/** Read the displayed public key (PEM) value. */
export declare function readKeyPublicKey(scope: Page | Locator): Promise<string>;
/** Read the displayed public JWK value. */
export declare function readKeyPublicJwk(scope: Page | Locator): Promise<string>;
/** Rename a key via the detail modal (opens the menu → Edit, then Save). */
export declare function renameKey(scope: Page | Locator, name: string, newName: string): Promise<void>;
export declare function closeKeyDetail(scope: Page | Locator): Promise<void>;
export declare function getKeyDeleteModal(scope: Page | Locator): Locator;
/** Open the delete confirmation for a key via its actions menu → Delete. */
export declare function openKeyDelete(scope: Page | Locator, name: string): Promise<void>;
export declare function confirmKeyDelete(scope: Page | Locator): Promise<void>;
export declare function cancelKeyDelete(scope: Page | Locator): Promise<void>;
/** Full delete-key flow (menu → Delete → confirm), expects the modal to close. */
export declare function deleteKey(scope: Page | Locator, name: string): Promise<void>;
/**
 * Assert the delete error (e.g. "key is associated with tool X"). The backend
 * returns 400/409 and the message is surfaced as a toast (matching the app's
 * delete-modal convention); the modal stays open so the user can cancel.
 */
export declare function expectKeyDeleteError(scope: Page | Locator, message: string): Promise<void>;
export declare function expectKeysEmpty(scope: Page | Locator): Promise<void>;
export declare function expectKeyInList(scope: Page | Locator, name: string): Promise<void>;
export declare function expectKeyNotInList(scope: Page | Locator, name: string): Promise<void>;
export declare function getToolsSection(scope: Page | Locator): Locator;
export declare function getCreateToolButton(scope: Page | Locator): Locator;
export declare function getToolsEmptyState(scope: Page | Locator): Locator;
export declare function getToolRow(scope: Page | Locator, name: string): Locator;
export declare function getToolEditButton(scope: Page | Locator, name: string): Locator;
export declare function getToolModal(scope: Page | Locator): Locator;
/** Field locators inside the (open) tool modal. */
export declare const toolFields: {
    title: (scope: Page | Locator) => Locator;
    issuer: (scope: Page | Locator) => Locator;
    clientId: (scope: Page | Locator) => Locator;
    authLoginUrl: (scope: Page | Locator) => Locator;
    authTokenUrl: (scope: Page | Locator) => Locator;
    authAudience: (scope: Page | Locator) => Locator;
    jwksUrl: (scope: Page | Locator) => Locator;
    jwksJson: (scope: Page | Locator) => Locator;
    deploymentIds: (scope: Page | Locator) => Locator;
};
export declare function getToolKeySelect(scope: Page | Locator): Locator;
export declare function openCreateToolModal(scope: Page | Locator): Promise<void>;
export declare function openEditToolModal(scope: Page | Locator, name: string): Promise<void>;
/** Pick the JWKS source (URL or raw JSON) in the open tool modal. */
export declare function selectToolKeySetMode(scope: Page | Locator, mode: LtiKeySetMode): Promise<void>;
/** Pick a signing key by name from the Radix select in the open tool modal. */
export declare function selectToolSigningKey(scope: Page | Locator, name: string): Promise<void>;
/** Fill every field of the open tool modal from `data`. */
export declare function fillToolForm(scope: Page | Locator, data: LtiToolFormData): Promise<void>;
export declare function submitToolModal(scope: Page | Locator): Promise<void>;
/** Full create-tool flow. */
export declare function createTool(scope: Page | Locator, data: LtiToolFormData): Promise<void>;
/** Full edit-tool flow (opens via the row's edit pencil, applies overrides). */
export declare function editTool(scope: Page | Locator, name: string, data: LtiToolFormData): Promise<void>;
export declare function expectToolsEmpty(scope: Page | Locator): Promise<void>;
export declare function expectToolInList(scope: Page | Locator, name: string): Promise<void>;
export declare function expectToolNotInList(scope: Page | Locator, name: string): Promise<void>;
/** Container for a single platform endpoint row. */
export declare function getEndpoint(scope: Page | Locator, endpoint: LtiEndpoint): Locator;
/** The `<code>` element holding an endpoint's URL. */
export declare function getEndpointUrl(scope: Page | Locator, endpoint: LtiEndpoint): Locator;
/** The per-endpoint "Copy URL" button. */
export declare function getEndpointCopyButton(scope: Page | Locator, endpoint: LtiEndpoint): Locator;
/** Read an endpoint URL string. */
export declare function readEndpointUrl(scope: Page | Locator, endpoint: LtiEndpoint): Promise<string>;
/** Click an endpoint's copy button; the button label flips to "Copied". */
export declare function copyEndpoint(scope: Page | Locator, endpoint: LtiEndpoint): Promise<void>;
export declare function expectEndpointUrl(scope: Page | Locator, endpoint: LtiEndpoint, url: string): Promise<void>;
/** Assert all four endpoints render with non-empty URLs. */
export declare function expectAllEndpointsVisible(scope: Page | Locator): Promise<void>;
