import { t as SupportedTarget } from "./target-types-C27BYOrn.cjs";
import { Annotation } from "@iiif/presentation-3";

//#region src/content-state.d.ts
type ContentState = string | (Annotation & {
  '@context'?: string;
}) | (StateSource & {
  '@context'?: string;
}) | Array<string | (Annotation & {
  '@context'?: string;
}) | (StateSource & {
  '@context'?: string;
})>;
type StateSource = {
  id: string;
  type: 'Manifest' | 'Canvas' | 'Range';
  partOf?: string | {
    id: string;
    type: string;
  } | Array<{
    id: string;
    type: string;
  }>;
};
type NormalisedContentState = {
  id: string;
  type: 'Annotation';
  motivation: ['contentState', ...string[]];
  target: Array<SupportedTarget>;
  extensions: Record<string, any>;
};
type ValidationResponse = readonly [false, {
  reason?: string;
}] | readonly [true];
declare function validateContentState(annotation: ContentState, strict?: boolean): ValidationResponse;
declare function serialiseContentState(annotation: ContentState): string;
declare function parseContentState(state: string): ContentState;
declare function parseContentState(state: string, async: false): ContentState;
declare function parseContentState(state: string, async: true): Promise<ContentState>;
declare function encodeContentState(state: string): string;
declare function decodeContentState(encodedContentState: string): string;
declare function normaliseContentState(state: ContentState): NormalisedContentState;
//#endregion
export { encodeContentState as a, serialiseContentState as c, decodeContentState as i, validateContentState as l, NormalisedContentState as n, normaliseContentState as o, StateSource as r, parseContentState as s, ContentState as t };
//# sourceMappingURL=content-state-BBUndEDA.d.cts.map