import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSProgress } from "../Foundation/NSProgress.js";
import type { _CNDecision } from "./CNDecision.js";
import type { _CNDetectionTrack } from "./CNDetectionTrack.js";
import type { _CNScriptChanges } from "./CNScriptChanges.js";
import type { _CNScriptFrame } from "./CNScriptFrame.js";
import type { _AVAsset } from "../AVFoundation/AVAsset.js";
import type { CMTime } from "../structs/CMTime.js";
import type { CMTimeRange } from "../structs/CMTimeRange.js";
export declare class _CNScript extends _NSObject {
    static alloc(): _CNScript;
    static new(): _CNScript;
    init(): _CNScript;
    /**
     * Load cinematic script asynchronously from a cinematic asset. - Parameters: - asset: the cinematic asset to be loaded. - changes: optional changes since asset was recorded. Can be obtained from a previous editing session. If `nil`, the asset is loaded as originally recorded. - progress: optional progress object to track progress or cancel loading. Represents just the loading of this asset. Create with desired total unit count or use zero to have the unit count filled in automatically. If `nil`, no progress is reported. - completionHandler: called with the loaded cinematic script when done, or with with an error if it fails. If progress is canceled before it completes, the completion handler is called with an error.
     */
    static loadFromAsset$changes$progress$completionHandler$(asset: _AVAsset, changes: _CNScriptChanges | null, progress: _NSProgress | null, completionHandler: ((script: _CNScript, error: _NSError) => void) | null): void;
    /**
     * Reload the cinematic script with optional changes applied, removing any previous changes made. This can be more efficient than loading the asset from scratch. - Parameters: - changes: optional changes since asset was recorded. Can be obtained from a previous editing session. If `nil`, the asset is reloaded as originally recorded.
     */
    reloadWithChanges$(changes: _CNScriptChanges | null): void;
    /**
     * Changes made since cinematic asset was recorded. Can be used to checkpoint and later restore changes made so far.
     */
    changes(): _CNScriptChanges;
    /**
     * Changes trimmed and time range shifted to start at zero — for use with a similarly trimmed cinematic asset.
     */
    changesTrimmedByTimeRange$(timeRange: CMTimeRange): _CNScriptChanges;
    /**
     * The closest frame to the given time within the given tolerance. Returns `nil` if there are none.
     */
    frameAtTime$tolerance$(time: CMTime, tolerance: CMTime): _CNScriptFrame | null;
    /** All frames within the given time range. */
    framesInTimeRange$(timeRange: CMTimeRange): _NSArray;
    /**
     * The closest decision to the given time within the given tolerance. Returns `nil` if there are none.
     */
    decisionAtTime$tolerance$(time: CMTime, tolerance: CMTime): _CNDecision | null;
    /** All decisions within the given time range. */
    decisionsInTimeRange$(timeRange: CMTimeRange): _NSArray;
    /**
     * The decision that occurs after the given time. Pass the time of an existing decision to find the next one.
     */
    decisionAfterTime$(time: CMTime): _CNDecision | null;
    /**
     * The decision that occurs before the given time. Pass the time of an existing decisions to find the previous one.
     */
    decisionBeforeTime$(time: CMTime): _CNDecision | null;
    /**
     * The primary decision that is in effect at the specified time, unless if it's outside the time range of the cinematic script. Also represents the decision that is being transitioned away from if the given time is during a focus transition.
     */
    primaryDecisionAtTime$(time: CMTime): _CNDecision | null;
    /**
     * The secondary decision that is being transitioned towards if the given time is during a focus transition.
     */
    secondaryDecisionAtTime$(time: CMTime): _CNDecision | null;
    /**
     * The time range during which the focus transition away from the given decision occurs.
     */
    timeRangeOfTransitionAfterDecision$(decision: _CNDecision): CMTimeRange;
    /**
     * The time range during which the focus transition towards the given decision occurs.
     */
    timeRangeOfTransitionBeforeDecision$(decision: _CNDecision): CMTimeRange;
    /**
     * All user decisions in the given time range. Includes user decisions made during recording or added to the script.
     */
    userDecisionsInTimeRange$(timeRange: CMTimeRange): _NSArray;
    /**
     * All base decisions made automatically during recording in the given time range. These apply if no user decision overrides them.
     */
    baseDecisionsInTimeRange$(timeRange: CMTimeRange): _NSArray;
    /**
     * A detection track representing all detections with the given detectionID over the entire cinematic script.
     */
    detectionTrackForID$(detectionID: number): _CNDetectionTrack | null;
    /**
     * A detection track representing all detections that would be chosen by a given decision.
     */
    detectionTrackForDecision$(decision: _CNDecision): _CNDetectionTrack | null;
    /**
     * Add a new user decision. Replaces an existing user decision if the times are identical. Adding a decision can fail if the decision focuses on an detection or group that does not exist or if its time is not within the time range of the cinematic script. - Returns: whether adding was successful
     */
    addUserDecision$(decision: _CNDecision): boolean;
    /**
     * Remove an existing user decision. User decisions added to the script or those made at recording time (by tapping during recording) can be removed. Decisions that are not user decisions cannot be removed. - Returns: whether removal was successful
     */
    removeUserDecision$(decision: _CNDecision): boolean;
    /** Remove all user decisions and revert to base decisions only. */
    removeAllUserDecisions(): void;
    /**
     * Add user created detection track. - Returns: the detectionID assigned to the added track, which can be used for later lookup or decision creation.
     */
    addDetectionTrack$(detectionTrack: _CNDetectionTrack): number;
    /**
     * Remove user created detection track. Tracks created at recording time cannot be removed. - Returns: whether removal was successful
     */
    removeDetectionTrack$(detectionTrack: _CNDetectionTrack): boolean;
    /**
     * The time range of the cinematic asset. All frames, decisions, and detections are within this time range.
     */
    timeRange(): CMTimeRange;
    /**
     * The f/number to apply to the entire movie, initially set to that of the recorded movie. Pass this to the rendering session in the rendering frame attributes to match the selected aperture. Change this property when the user selects a different aperture for the edited movie. Changes to this property are reflected in the script changes for later restoration.
     */
    fNumber(): number;
    setFNumber$(value: number): void;
    /** All detection tracks that have been added since recording. */
    addedDetectionTracks(): _NSArray;
}
