import type { Operation } from 'rfc6902';
import type { NxtError, MediaType, RenderPreset, RenderSceneObject } from '../../common/index.ts';
export interface MediaDomainRecords {
    ":media.source": MediaSourceRecord;
    ":media.placeholder": MediaPlaceholderRecord;
    ":media.consolidate": MediaDomainConsolidateRecord;
    ":media.consolidate?": MediaDomainConsolidateRecordProvided;
    ":media.renders?": MediaRendersRecord;
    ":media.transcriptChanges": MediaTranscriptChangesRecord;
    ":media.font": MediaFontRecord;
    ":media.restrictions?": MediaRestrictionsRecord;
    ":media.probe?": MediaProbeRecord;
    ":media.updateSubtitles?": MediaDomainUpdateSubtitlesRecord;
    ":media.updateGraphics?": MediaDomainUpdateGraphicsRecord;
    ":media.revisions": MediaDomainRevisionsRecord;
}
export type MediaSourceRecord = RenderSceneObject;
export interface MediaPlaceholderRecord {
    asset: string;
}
export interface MediaDomainConsolidateRecord {
    source?: unknown;
    target?: unknown;
    preset?: RenderPreset;
    error?: unknown;
}
export interface MediaDomainConsolidateRecordProvided {
    status: "idle" | "pending" | "completed" | "error" | "source_mismatch";
    progress?: number;
    error?: unknown;
}
export interface MediaRendersRecord {
    children: MediaRenderRecordValue[];
}
export interface MediaRenderRecordValue {
    id?: string;
    title?: string;
    children?: MediaRenderRecordValue[];
}
export type MediaTranscriptChangesRecord = {
    [patchKey: string]: MediaTranscriptChangesRecordValue;
};
export interface MediaTranscriptChangesRecordValue {
    patch?: Operation[];
    /** Labels for speakers */
    speakerLabels?: {
        [speakerId: string]: string;
    };
    /** Override speaker IDs for specific paragraphs */
    speakerRemaps?: {
        [paragraphId: string]: string;
    };
}
export interface MediaFontRecord {
    sampleText?: string;
}
export interface MediaRestrictionsRecord {
    [restrictionId: string]: {
        asset: string;
        date: string;
        user: string;
        text: string;
        start: number;
        end: number;
        file: string;
    };
}
export interface MediaProbeRecord {
    duration?: number | null;
    error: NxtError | null;
    type: MediaType;
    live?: boolean | null;
    url?: string | null;
    subtitle?: {
        codec?: string | null;
    };
}
export interface MediaDomainUpdateSubtitlesRecord {
    [key: string]: unknown;
}
export interface MediaDomainUpdateGraphicsRecord {
    [key: string]: unknown;
}
export interface MediaDomainRevisionsRecord {
    [revisionId: string]: RenderSceneObject;
}
