import { formatAsList } from "./utils.js";
export var Action;
(function (Action) {
    Action["SAVE"] = "save";
    Action["INJECT"] = "inject";
})(Action || (Action = {}));
export var MatchMode;
(function (MatchMode) {
    MatchMode["STRICT"] = "strict";
    MatchMode["FLEXIBLE"] = "flexible";
    MatchMode["PARTIAL"] = "partial";
})(MatchMode || (MatchMode = {}));
export var LinkType;
(function (LinkType) {
    LinkType["SYMLINK"] = "symlink";
    LinkType["HARDLINK"] = "hardlink";
    LinkType["REFLINK"] = "reflink";
    LinkType["REFLINK_OR_COPY"] = "reflinkOrCopy";
})(LinkType || (LinkType = {}));
export var BlocklistType;
(function (BlocklistType) {
    BlocklistType["NAME"] = "name";
    BlocklistType["NAME_REGEX"] = "nameRegex";
    BlocklistType["FOLDER"] = "folder";
    BlocklistType["FOLDER_REGEX"] = "folderRegex";
    BlocklistType["CATEGORY"] = "category";
    BlocklistType["TAG"] = "tag";
    BlocklistType["TRACKER"] = "tracker";
    BlocklistType["INFOHASH"] = "infoHash";
    BlocklistType["SIZE_BELOW"] = "sizeBelow";
    BlocklistType["SIZE_ABOVE"] = "sizeAbove";
    BlocklistType["LEGACY"] = "legacy";
})(BlocklistType || (BlocklistType = {}));
export const NEWLINE_INDENT = "\n\t\t\t\t";
/**
 * error messages and map returned upon Zod validation failure
 */
export const ZodErrorMessages = {
    blocklistType: `Blocklist item does not start with a valid prefix. Must be of ${formatAsList(Object.values(BlocklistType), { sort: false, style: "narrow", type: "unit" })}`,
    blocklistEmptyValue: `Blocklist item must have a value after the colon.`,
    blocklistRegex: `Blocklist regex is not a valid regex.`,
    blocklistFolder: `Blocklist folder must not contain path separators`,
    blocklistTracker: `Blocklist tracker is not a valid URL host. If URL is https://user:pass@tracker.example.com:8080/announce/key, you must use "tracker:tracker.example.com:8080"`,
    blocklistHash: `Blocklist hash must be 40 characters and alphanumeric`,
    blocklistSize: `Blocklist size must be an integer for the number of bytes. You can only have one sizeBelow, one sizeAbove, and sizeBelow <= sizeAbove.`,
    blocklistNeedsClient: `Blocklist ${BlocklistType.CATEGORY}:, ${BlocklistType.TAG}:, and ${BlocklistType.TRACKER}: requires torrentDir or useClientTorrents.`,
    blocklistNeedsDataDirs: `Blocklist ${BlocklistType.FOLDER}: and ${BlocklistType.FOLDER_REGEX}: only applies to searchees from dataDirs.`,
    vercel: "format does not follow vercel's `ms` style ( https://github.com/vercel/ms#examples )",
    emptyString: "cannot have an empty string. If you want to unset it, use null or undefined.",
    delayNegative: "delay is in seconds, you can't travel back in time.",
    delayUnsupported: `delay must be 30 seconds to 1 hour.${NEWLINE_INDENT}To even out search loads please see the following documentation:${NEWLINE_INDENT}(https://www.cross-seed.org/docs/basics/options#delay)`,
    rssCadenceUnsupported: "rssCadence must be 10-120 minutes",
    searchCadenceUnsupported: "searchCadence must be at least 1 day.",
    searchCadenceExcludeRecent: "excludeRecentSearch must be at least 3x searchCadence.",
    excludeRecentOlder: "excludeOlder and excludeRecentSearch must be defined for searching. excludeOlder must be 2-5x excludeRecentSearch.",
    injectNeedsInjectMode: "`cross-seed inject` requires the 'inject' action.",
    autoResumeMaxDownloadUnsupported: "autoResumeMaxDownload must be an integer of bytes between between 0 and 52428800 (50 MiB).",
    numberMustBeRatio: "fuzzySizeThreshold and seasonFromEpisodes must be between 0 and 1.",
    fuzzySizeThresholdMax: "fuzzySizeThreshold cannot be greater than 0.1 when using searchCadence or rssCadence.",
    seasonFromEpisodesMin: "seasonFromEpisodes cannot be less than 0.5 when using searchCadence or rssCadence",
    injectUrl: "You need to specify rtorrentRpcUrl, transmissionRpcUrl, qbittorrentUrl, or delugeRpcUrl when using 'inject'",
    qBitAutoTMM: "If using Automatic Torrent Management in qBittorrent, please read: https://www.cross-seed.org/docs/v6-migration#new-folder-structure-for-links",
    includeSingleEpisodes: "includeSingleEpisodes is not recommended when using announce, please read: https://www.cross-seed.org/docs/v6-migration#updated-includesingleepisodes-behavior",
    invalidOutputDir: "outputDir should only contain .torrent files, cross-seed will populate and manage (https://www.cross-seed.org/docs/basics/options#outputdir)",
    torrentDirAndUseClientTorrents: "You cannot have both torrentDir and useClientTorrents.",
    needsClient: "You need to have a client configured for useClientTorrents.",
    needSearchees: "You need to have torrentDir, useClientTorrents or dataDirs for search/rss/announce matching to work.",
    matchModeInvalid: `matchMode must be one of: ${formatAsList(Object.values(MatchMode).map((m) => `"${m}"`), { sort: false, style: "narrow", type: "unit" })}`,
    matchModeNeedsLinkDirs: `When using action: "inject", you need to set linkDirs for flexible and partial matchMode (https://www.cross-seed.org/docs/tutorials/linking). If you cannot use linking, use matchMode: "strict"`,
    ensembleNeedsClient: "seasonFromEpisodes requires a torrent client to connect to when using torrentDir or useClientTorrents.",
    ensembleNeedsLinkDirs: "When using action 'inject', you need to set linkDirs for seasonFromEpisodes (https://www.cross-seed.org/docs/tutorials/linking). If you cannot use linking, disable this option by using seasonFromEpisodes: null",
    ensembleNeedsPartial: "seasonFromEpisodes requires matchMode partial if enabled and value is below 1.",
    linkDirsInOtherDirs: "You cannot have your linkDirs inside of your torrentDir/dataDirs/outputDir. Please adjust your paths to correct this.",
    dataDirsInOtherDirs: "You cannot have your dataDirs inside of your torrentDir/linkDirs/outputDir. Please adjust your paths to correct this.",
    torrentDirInOtherDirs: "You cannot have your torrentDir inside of your dataDirs/linkDirs/outputDir. Please adjust your paths to correct this.",
    outputDirInOtherDirs: "You cannot have your outputDir inside of your torrentDir/dataDirs/linkDirs. Please adjust your paths to correct this.",
    relativePaths: "Absolute paths for torrentDir, linkDirs, dataDirs, and outputDir are recommended.",
};
/**
 * Default config values
 */
export const defaultConfig = {
    delay: 30,
    torznab: [],
    useClientTorrents: false,
    torrentClients: [],
    dataDirs: [],
    matchMode: MatchMode.STRICT,
    skipRecheck: true,
    autoResumeMaxDownload: 52428800,
    linkCategory: undefined,
    linkDirs: [],
    linkType: LinkType.HARDLINK,
    flatLinking: false,
    maxDataDepth: 2,
    torrentDir: undefined,
    outputDir: "",
    injectDir: "",
    includeSingleEpisodes: false,
    includeNonVideos: false,
    ignoreNonRelevantFilesToResume: false,
    fuzzySizeThreshold: 1,
    seasonFromEpisodes: undefined,
    excludeOlder: undefined,
    excludeRecentSearch: undefined,
    action: Action.INJECT,
    // qbittorrentUrl: null,
    // rtorrentRpcUrl: null,
    // transmissionRpcUrl: null,
    // delugeRpcUrl: null,
    duplicateCategories: false,
    notificationWebhookUrls: [],
    port: undefined,
    host: undefined,
    rssCadence: undefined,
    searchCadence: undefined,
    snatchTimeout: undefined,
    searchTimeout: undefined,
    searchLimit: undefined,
    verbose: false,
    torrents: [],
    blockList: [],
    apiKey: undefined,
    radarr: [],
    sonarr: [],
};
//# sourceMappingURL=constants.js.map