import { $ as DefaultDocumentNodeResolver, $t as FormViewBuilder, C as StructureToolContextValue, K as SerializePath, Qt as FormView, en as ComponentView, et as StructureBuilder, p as PaneNode, rt as UserViewComponent, t as DocumentPaneContextValue, tn as ComponentViewBuilder, x as StructureResolver } from "./DocumentPaneContext-CWVXDuPK.js";
import { ComponentProps, ElementType, HTMLProps, ReactNode } from "react";
import { Path, SanityDocument, SanityDocumentLike } from "@sanity/types";
import { CardProps } from "@sanity/ui";
import { PerspectiveStack, ReleaseId, Source, TimelineStore } from "sanity";
/**
 * The reference counts known at the point a delete is confirmed, surfaced so
 * callers can record telemetry about how heavily referenced a document was.
 *
 * @internal
 */
interface DeleteReferenceCounts {
  totalReferenceCount: number;
  internalReferenceCount: number;
  crossDatasetReferenceCount: number;
}
/** @internal */
interface ConfirmDeleteDialogProps {
  /**
   * Incoming document ID used to find other referencing documents. This
   * field respects draft IDs (e.g. if you pass in a published ID when one
   * doesn't exist the document title may not show up).
   */
  id: string;
  /**
   * The schema typename of the incoming document
   */
  type: string;
  /**
   * The name of the action being done. (e.g. the `'unpublish'` action requires
   * the same document deletion confirmation).
   */
  action?: 'delete' | 'unpublish';
  /**
   * When `false`, skips loading incoming references and shows a simple
   * confirmation. Used when unpublishing a published content variant — refs
   * always target the base published id, not the variant id.
   */
  checkIncomingReferences?: boolean;
  onCancel: () => void;
  onConfirm: (versions: string[], referenceCounts: DeleteReferenceCounts) => void;
}
/** @internal */
declare function ConfirmDeleteDialogContainer(props: ConfirmDeleteDialogProps): import("react").JSX.Element;
interface DocumentInspectorHeaderProps {
  as?: ElementType;
  closeButtonLabel: string;
  flex?: CardProps['flex'];
  onClose: () => void;
  title: ReactNode;
}
/** @internal */
declare function DocumentInspectorHeader(props: DocumentInspectorHeaderProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref'>): import("react").JSX.Element;
/** @internal */
declare function getTypeNamesFromFilter(filter: string, params?: Record<string, unknown>): string[];
interface BaseStructureToolPaneProps<T extends PaneNode['type']> {
  paneKey: string;
  index: number;
  itemId: string;
  childItemId?: string;
  isSelected?: boolean;
  isActive?: boolean;
  pane: Extract<PaneNode, {
    type: T;
  }>;
  /**
   * TODO: COREL - Remove this after updating sanity-assist to use <PerspectiveProvider>
   *
   * Allows to override the global version with a specific version or release.
   * @deprecated use <PerspectiveProvider> instead
   * @beta
   */
  forcedVersion?: {
    selectedPerspectiveName: ReleaseId | 'published' | undefined;
    isReleaseLocked: boolean;
    selectedReleaseId: ReleaseId | undefined;
  };
  /**
   * @deprecated Avoid specifying a key, instead use `paneKey` if need be
   */
  key?: string;
}
/** @internal */
type DocumentPaneProviderProps = {
  children?: React.ReactNode;
  onFocusPath?: (path: Path) => void;
  onSetMaximizedPane?: () => void;
  maximized?: boolean;
} & BaseStructureToolPaneProps<'document'>;
/** @internal */
declare function useDocumentPane(): DocumentPaneContextValue;
/**
 * @internal
 */
declare const PaneContainer: import("react").MemoExoticComponent<(props: BaseStructureToolPaneProps<'documentList'>) => import("react").JSX.Element>;
/**
 * @internal
 */
type DocumentListPaneProps = ComponentProps<typeof PaneContainer>;
/** @internal */
interface StructureBuilderOptions {
  source: Source;
  defaultDocumentNode?: DefaultDocumentNodeResolver;
  perspectiveStack: PerspectiveStack;
  selectedVariantName?: string;
}
/** @internal */
declare function createStructureBuilder({ defaultDocumentNode, source, perspectiveStack, selectedVariantName }: StructureBuilderOptions): StructureBuilder;
/** @internal */
declare class SerializeError extends Error {
  readonly path: SerializePath;
  helpId?: (typeof HELP_URL)[keyof typeof HELP_URL];
  constructor(message: string, parentPath: SerializePath, pathSegment: string | number | undefined, hint?: string);
  withHelpUrl(id: (typeof HELP_URL)[keyof typeof HELP_URL]): SerializeError;
}
/** @internal */
declare const HELP_URL: {
  ID_REQUIRED: 'structure-node-id-required';
  TITLE_REQUIRED: 'structure-title-required';
  FILTER_REQUIRED: 'structure-filter-required';
  INVALID_LIST_ITEM: 'structure-invalid-list-item';
  COMPONENT_REQUIRED: 'structure-view-component-required';
  DOCUMENT_ID_REQUIRED: 'structure-document-id-required';
  DOCUMENT_TYPE_REQUIRED: 'structure-document-type-required';
  SCHEMA_TYPE_REQUIRED: 'structure-schema-type-required';
  SCHEMA_TYPE_NOT_FOUND: 'structure-schema-type-not-found';
  LIST_ITEMS_MUST_BE_ARRAY: 'structure-list-items-must-be-array';
  QUERY_PROVIDED_FOR_FILTER: 'structure-query-provided-for-filter';
  ACTION_OR_INTENT_REQUIRED: 'structure-action-or-intent-required';
  LIST_ITEM_IDS_MUST_BE_UNIQUE: 'structure-list-item-ids-must-be-unique';
  ACTION_AND_INTENT_MUTUALLY_EXCLUSIVE: 'structure-action-and-intent-mutually-exclusive';
  API_VERSION_REQUIRED_FOR_CUSTOM_FILTER: 'structure-api-version-required-for-custom-filter';
};
/** @internal */
declare const form: (spec?: Partial<FormView>) => FormViewBuilder;
/** @internal */
declare const component: (componentOrSpec?: UserViewComponent | Partial<ComponentView>) => ComponentViewBuilder;
/** @internal */
interface StructureToolProviderProps {
  structure?: StructureResolver;
  defaultDocumentNode?: DefaultDocumentNodeResolver;
  children: ReactNode;
}
/** @internal */
declare function StructureToolProvider({ defaultDocumentNode, structure: resolveStructure, children }: StructureToolProviderProps): React.JSX.Element;
/** @internal */
declare function useStructureTool(): StructureToolContextValue;
export { ConfirmDeleteDialogContainer as _, form as a, StructureBuilderOptions as c, PaneContainer as d, useDocumentPane as f, DocumentInspectorHeader as g, getTypeNamesFromFilter as h, component as i, createStructureBuilder as l, BaseStructureToolPaneProps as m, StructureToolProvider as n, HELP_URL as o, DocumentPaneProviderProps as p, StructureToolProviderProps as r, SerializeError as s, useStructureTool as t, DocumentListPaneProps as u, ConfirmDeleteDialogProps as v };
//# sourceMappingURL=useStructureTool-BMqRgGG5.d.ts.map