"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fileConflictStrategyType = void 0;
exports.isFilename = isFilename;
exports.isFolderPath = isFolderPath;
exports.isFilePath = isFilePath;
exports.isFileConflictStrategyType = isFileConflictStrategyType;
const typeutil_1 = require("@epdoc/typeutil");
/**
 * Type guard checks if the given value is a valid file name.
 *
 * @param {any} val The value to check.
 * @returns True if the value is a non-empty string, false otherwise.
 */
function isFilename(val) {
    return (0, typeutil_1.isNonEmptyString)(val);
}
/**
 * Type guard checks if the given value is a valid folder path.
 *
 * @param val The value to check.
 * @returns True if the value is a non-empty string, false otherwise.
 */
function isFolderPath(val) {
    return (0, typeutil_1.isNonEmptyString)(val);
}
/**
 * Type guard checks if the given value is a valid file path.
 *
 * @param val The value to check.
 * @returns True if the value is a non-empty string, false otherwise.
 */
function isFilePath(val) {
    return (0, typeutil_1.isNonEmptyString)(val);
}
/**
 * A mapping of conflict strategy types to their string representations.
 */
exports.fileConflictStrategyType = {
    renameWithTilde: 'renameWithTilde',
    renameWithNumber: 'renameWithNumber',
    overwrite: 'overwrite',
    error: 'error'
};
/**
 * Checks if a given value is a valid FileConflictStrategyType.
 *
 * @param value The value to check.
 * @returns True if the value is a valid FileConflictStrategyType, false otherwise.
 */
function isFileConflictStrategyType(value) {
    return typeof value === 'string' && value in Object.keys(exports.fileConflictStrategyType);
}
//# sourceMappingURL=types.js.map