"use strict";
/**
 * Data validation utilities
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidChat = isValidChat;
exports.isNonEmptyString = isNonEmptyString;
/**
 * Validate chat structure
 * @param {unknown} chat - Value to validate as chat
 * @returns {boolean} True if value is a valid chat
 */
function isValidChat(chat) {
    return (typeof chat === 'object' &&
        chat !== null &&
        typeof chat.id === 'string' &&
        typeof chat.name === 'string' &&
        (chat.createTime === null ||
            typeof chat.createTime === 'string'));
}
/**
 * Validate non-empty string
 * @param {unknown} value - Value to validate as non-empty string
 * @returns {boolean} True if value is a non-empty string
 */
function isNonEmptyString(value) {
    return typeof value === 'string' && value.trim().length > 0;
}
//# sourceMappingURL=validation.js.map
