/**
 * Derives a valid URL scheme from the project name
 * - Converts to lowercase
 * - Removes all non-alphanumeric characters
 * - Ensures it starts with a letter (required by iOS/Android)
 * - Falls back to "app" if result is empty
 */
export function deriveAppScheme(projectName) {
    // Handle undefined or empty project name
    if (!projectName) {
        return 'app';
    }
    // Remove non-alphanumeric characters and convert to lowercase
    let scheme = projectName.toLowerCase().replace(/[^a-z0-9]/g, '');
    // URL schemes must start with a letter
    if (scheme && !/^[a-z]/.test(scheme)) {
        scheme = 'app' + scheme;
    }
    // Fallback if empty
    if (!scheme) {
        scheme = 'app';
    }
    return scheme;
}
//# sourceMappingURL=index.js.map