import type { Paths } from 'type-fest';
import type { PipelineSortMode } from './pipeline.ts';
import type { PromotedTag } from './promoted-tag.ts';
import type { NotificationReason } from './user-notification.ts';
import type { SubtitleStyle } from './subtitle-style.ts';
import type { PrintOptions } from './print.ts';
export interface Settings {
    autoLogoutTime?: number;
    permission?: {
        overrideUserContact?: boolean;
        overrideUserLogin?: boolean;
    };
    graphics?: {
        width?: number;
        height?: number;
    };
    googleWhitelist?: Array<{
        domain?: string;
    }>;
    googleUserRoles?: string[];
    azureWhitelist?: Array<{
        domain?: string;
    }>;
    azureUserRoles?: string[];
    module?: {
        editor?: string;
        tabs?: ModuleTabs;
    };
    upload?: {
        defaultGrouping?: "" | "collection" | "stitch";
        hideStoryboardCollection?: boolean;
        displayUploadFilesDialog?: "never" | "ifMultipleFiles" | "always";
    };
    download?: {
        displaySaveDialog?: boolean;
        /**
         * Whether to prompt the user for each individual file path,
         * or just the directory.
         */
        batchDownloadDialogMode?: "file" | "directory";
    };
    browser?: {
        map?: {
            clustering?: boolean;
            zoom?: number;
            center?: [
                number,
                number
            ];
        };
        createMenu?: {
            sortOrder?: string[];
        };
    };
    toolbarTags?: {
        include?: string[];
        exclude?: string[];
    };
    /**
     * Controls which tags cannot be used together. When a tag from the group is
     * manually added to an asset, any other tag from the group will be removed.
     */
    exclusiveTagGroups?: (null | string[])[];
    deadlines?: {
        include?: string[];
        exclude?: string[];
    };
    assignees?: {
        include?: string[];
        exclude?: string[];
    };
    comments?: {
        include?: string[];
        exclude?: string[];
    };
    clock?: {
        enable?: boolean;
        show24Hours?: boolean;
        showAmPm?: boolean;
        showSeconds?: boolean;
        showDayOfWeek?: boolean;
        showDate?: boolean;
        format?: string;
    };
    swarm?: {
        color?: string;
        name?: string;
    };
    dashboard?: {
        maxMru?: number;
        maxTabs?: number;
        layout?: {
            bookmarks?: number;
            browser?: number;
        };
    };
    script?: {
        createMenu?: {
            sortBy?: "index" | "title";
            showPreview?: boolean;
        };
        contentMaxWidth?: number;
        colorTags?: PromotedTag[];
        readType?: "characters" | "words" | "wordsPerMinute";
        readRate?: number;
        collapsedNodes?: {
            [eventId: string]: {
                preview?: boolean;
                children?: boolean;
            };
        };
        colorHistory?: Array<{
            color: string | null;
            backgroundColor: string | null;
        }>;
    };
    events?: {
        graphicBaseTemplate?: string;
        favorites?: string[];
        defaults?: Record<string, {
            event?: string;
            property?: string;
        }>;
    };
    rundown?: {
        eventThumbnails?: boolean;
        scriptEventFolding: "folded" | "unfoldedUntilFolded";
        stickyHeaders?: boolean;
        triggersColumn?: "triggers" | "title";
        density?: "normal" | "compact" | "spacious";
        showEvents?: boolean;
        showTriggers?: boolean;
        showReferenceDuration?: boolean;
        editPlaceholderDuration?: boolean;
        showSettingsColumn?: boolean;
        showEventStartTime?: boolean;
    };
    gallery?: {
        dimOnBlur?: boolean;
        float?: "rundown" | "gallery" | "disabled";
        countFloatedDuration?: boolean;
        fallbackToPublishedSegmentTime?: boolean;
    };
    history?: boolean;
    keymap?: SettingsKeymap;
    media?: {
        volume?: number;
        muted?: boolean;
        graphics?: boolean;
        subtitle?: string | null;
        waveform?: boolean;
        defaultFrameRate?: number;
        dropFrame?: boolean;
        placeholder?: string;
        warnSubclipDuration?: number;
        displayAspectRatioPresets?: Array<{
            label?: string;
            value?: string;
        }>;
        guide?: {
            mask?: boolean;
            actionSafe?: boolean;
            titleSafe?: boolean;
        };
        stepManyFrames?: number;
        liveZoomDuration?: number;
        importTitleTemplate?: string;
        tile?: {
            preview?: boolean | "play" | "seek" | "seekplay" | "disabled";
            showRenderProgress?: boolean;
        };
        showTimeCode?: boolean;
        timecodeReference?: "subclip" | "default";
        maxSubclipDuration?: number;
        rewindStep?: number;
        forwardStep?: number;
        interlacedPlayback?: string;
        playbackRates?: number[];
        subtitles?: {
            spacing?: number;
            maxCharactersPerLine?: number;
            suggestions?: Array<{
                /** aspect ratio in the form of "width:height" */
                ifAspectRatio?: string | null;
                ifLang?: string | null;
                thenStyle?: string | null;
                thenMaxCharactersPerLine?: number | null;
            }>;
            colors?: Array<{
                label?: string | null;
                color?: string | null;
            }>;
            overridableProperties?: Array<keyof SubtitleStyle | null>;
            previewResolutionScale?: number;
        };
        subtitleTemplateId?: string;
        initialVolume?: string;
        guides?: Array<{
            label?: string;
            aspectRatio?: string;
        }>;
        download?: boolean;
        editMode?: {
            enabled?: boolean;
            defaultEnterOption?: "edit" | "createNew" | "none";
            defaultExitOption?: "update" | "leave" | "none";
        };
        transcribe?: {
            showSpeakers?: boolean;
            subtitleDisclaimer?: {
                isUserConfigurable?: boolean;
                defaultValue?: {
                    enabled?: false;
                    text?: Array<{
                        language?: string;
                        value?: string;
                    }>;
                    offset?: number;
                    duration?: number;
                };
            };
        };
        openCommand?: {
            url?: string;
            command?: string;
            app?: string;
            args?: string[];
        } | string;
        recorder?: {
            microphone?: {
                deviceId?: string;
                inputGainDb?: number;
                monitorInput?: boolean;
            };
            webcam?: {
                deviceId?: string;
                frameRate?: number;
                aspectRatio?: number;
            };
            countdown?: number;
        };
    };
    edit?: {
        thumbnailView?: "filmStrip" | "thumbnail" | "none";
        audioMapping?: {
            presets?: Array<AudioMappingPreset>;
        };
        normalize?: {
            presets?: Array<{
                id: string;
                title: string;
                i: number;
                tp: number;
            }>;
            defaultPresetId?: string;
        };
        voiceOver?: {
            inputDevice?: string;
            inputGainDb?: number;
            monitorInput?: boolean;
            backgroundReductionDb?: number;
            recordMode?: "instant" | "punchAndRoll";
            preRollDuration?: number;
        };
    };
    commands?: Array<{
        title?: string;
        command?: string;
        args?: string[];
    }>;
    predefinedTags?: string[];
    storyboard?: {
        folded?: {
            auto?: boolean;
        };
        assets?: {
            story?: {
                excerpt?: {
                    maxLines?: number;
                    mode?: string;
                    comments?: boolean;
                };
            };
            note?: {
                maxHeight?: number;
            };
        };
        pipeline?: {
            search?: {
                maxItemsDisplayed?: number;
            };
            sortMode?: PipelineSortMode;
        };
        item?: {
            maxHeight?: number;
            titleLines?: number;
        };
    };
    print?: {
        fontFamilies?: string[];
        presets?: Array<PrintOptions>;
    };
    hiddenPreviews?: Array<{
        id?: string;
        folded?: boolean;
    }>;
    plugins?: {
        adobe?: {
            videoBin?: string;
            imageBin?: string;
            audioBin?: string;
            timelineBin?: string;
            clipBin?: string;
            downloadPath?: string;
            renderPath?: string;
            renderPresetPath?: string;
            renderPresets?: string[];
            videoRenderPreset?: string;
            imageRenderPreset?: string;
            audioRenderPreset?: string;
            forceRender?: boolean;
            useProxies?: boolean;
            deleteIntermediateFiles?: boolean;
            bodymovin?: {
                template?: string;
            };
        };
        ograf?: {
            template?: string;
            disableReplaceMedia?: boolean;
        };
        rive?: {
            template?: string;
        };
    };
    crashScreen?: boolean;
    debug?: boolean;
    featurePreview?: {
        collections?: boolean;
        aiMetadata?: boolean;
        semanticSearch?: boolean;
        ameRemoteRendering?: boolean;
    };
    flags?: {
        utils?: boolean;
        utilsAssetEditor?: boolean;
        utilsAssetPanel?: boolean;
        history?: boolean;
        refs?: boolean;
        access?: boolean;
        files?: boolean;
        export?: boolean;
        json?: boolean;
        hlsjs?: boolean;
        resetRenders?: boolean;
        resetReplicas?: boolean;
        assetStatus?: boolean;
        consolidateMedia?: boolean;
        hideInAssetMenu?: boolean;
        assetRoute?: boolean;
        devWarnings?: boolean;
        downloadFiles?: boolean;
        supportPortal?: boolean;
        multiplexWebSockets?: boolean;
        systemHealth?: boolean;
        systemHealthIgnore?: boolean;
        systemHealthDebugLevel?: boolean;
    };
    notifications?: {
        events?: {
            comment?: NotificationReason[];
            assigned?: NotificationReason[];
            unassigned?: NotificationReason[];
            publishSucceeded?: {
                [connectionId: string]: NotificationReason[];
            };
        };
    };
    suppressDeleteAlert?: boolean;
    clone?: {
        create?: {
            titlePrefix?: string;
            titleSuffix?: string;
        };
        duplicate?: {
            titlePrefix?: string;
            titleSuffix?: string;
        };
    };
    utilsAssetEditorPanel?: {
        stateFilter?: number[];
        textFilter?: string;
        showEmpty?: boolean;
        selectedRecord?: string;
        subscribeSearchHits?: boolean;
        parseRegex?: boolean;
    };
    display?: {
        disableHotArea?: boolean;
    };
    bookmarks?: {
        refreshInterval?: number;
    };
    shotbox?: {
        layout?: string;
    };
    performance?: {
        /** List of message identifiers to ignore warnings (format: "serviceName:messageText") */
        ignoredWarnings?: string[];
        /** List of message identifiers to ignore errors (format: "serviceName:messageText") */
        ignoredErrors?: string[];
    };
    app?: {
        enableUpdate?: boolean;
        autoUpdate?: boolean;
    };
}
export type SettingsPaths = Paths<Settings>;
interface ModuleTabs {
    [tabId: string]: ModuleTabsSettingsValue | undefined;
    settingsPanelStore?: SettingsPanelStoreTab;
}
interface ModuleTabsSettingsValue {
    activeTab?: string | null;
    priority?: number;
    height?: number | null;
}
interface SettingsPanelStoreTab extends ModuleTabsSettingsValue {
    activeSectionIndex?: number;
}
export type SettingsKeymap = Record<string, SettingsKeymapScope>;
export interface SettingsKeymapEntry {
    sequence?: string | (string | [
        string,
        unknown
    ] | {
        sequence: string;
        data?: unknown;
        throttleMs?: number;
    })[] | null | undefined;
}
export declare const isSettingsKeymapEntry: (input: unknown) => input is SettingsKeymapEntry;
export type SettingsKeymapScope = Record<string, SettingsKeymapEntry>;
export declare const isSettingsKeymapScope: (input: unknown) => input is SettingsKeymapScope;
export interface AudioMappingPreset {
    id: string;
    title: string;
    mapping?: number[][];
    mute?: boolean[];
    minInChannels?: number;
    maxInChannels?: number;
    minOutChannels?: number;
    maxOutChannels?: number;
}
export {};
