import type React from 'react'; import { Path } from '@sanity/types'; import { RouterPanes, RouterPaneSibling } from '../../types'; export interface ChildLinkProps { childId: string; childParameters?: Record; childPayload?: unknown; children?: React.ReactNode; } export interface BackLinkProps { children?: React.ReactNode; } export interface ReferenceChildLinkProps { documentId: string; documentType: string; parentRefPath: Path; template?: { id: string; params?: Record; }; children: React.ReactNode; } export interface ParameterizedLinkProps { params?: Record; payload?: unknown; } interface EditReferenceOptions { parentRefPath: Path; id: string; type: string; template: { id: string; params?: Record; }; } export interface PaneRouterContextValue { /** * Zero-based index (position) of pane, visually */ index: number; /** * Zero-based index of pane group (within URL structure) */ groupIndex: number; /** * Zero-based index of pane within sibling group */ siblingIndex: number; /** * Payload of the current pane */ payload?: unknown; /** * Params of the current pane */ params?: RouterPaneSibling['params']; /** * Whether or not the pane has any siblings (within the same group) */ hasGroupSiblings: boolean; /** * The length of the current group */ groupLength: number; /** * Current router state for the "panes" property */ routerPanesState: RouterPanes; /** * Curried StateLink that passes the correct state automatically */ ChildLink: React.ComponentType; /** * Curried StateLink that pops off the last pane group */ BackLink: React.ComponentType; /** * A specialized `ChildLink` that takes in the needed props to open a * referenced document to the right */ ReferenceChildLink: React.ComponentType; /** * Similar to `ReferenceChildLink` expect without the wrapping component */ handleEditReference: (options: EditReferenceOptions) => void; /** * Curried StateLink that passed the correct state, but merges params/payload */ ParameterizedLink: React.ComponentType; /** * Replaces the current pane with a new one */ replaceCurrent: (pane: { id?: string; payload?: unknown; params?: Record; }) => void; /** * Removes the current pane from the group */ closeCurrent: () => void; /** * Duplicate the current pane, with optional overrides for item ID and parameters */ duplicateCurrent: (pane?: { payload?: unknown; params?: Record; }) => void; /** * Set the current "view" for the pane */ setView: (viewId: string | null) => void; /** * Set the parameters for the current pane */ setParams: (params: Record) => void; /** * Set the payload for the current pane */ setPayload: (payload: unknown) => void; /** * Proxied navigation to a given intent. Consider just exposing `router` instead? */ navigateIntent: (intentName: string, params: Record, options?: { replace?: boolean; }) => void; } export {}; //# sourceMappingURL=types.d.ts.map