import { ChildProcess } from 'child_process';
import type { BuildOptions } from 'esbuild';
import type { CopyOptionsSync } from 'fs-extra';
import { CoreModels } from 'tnp-core';
import { BaseProject } from '../base/classes/base-project';
export { Helpers } from 'tnp-core';
export interface GetRecrusiveFilesFromOptions {
}
export declare namespace HelpersTaon {
    namespace cliTool {
        const resolveItemsFromArgsBegin: <T = any>(argumentsCommands: string | string[], argsResolveFunc: (currentArg: string, restOfArgs: string) => T, limit?: number) => {
            /**
             * arr of resolve things
             */
            allResolved: T[];
            /**
             * command cleared
             */
            clearedCommand: string;
        };
        const resolveItemFromArgsBegin: <T = any>(argumentsCommands: string | string[], argsResolveFunc: (currentArg: string, restOfArgs: string) => T) => {
            /**
             * resolve thing
             */
            resolved: T;
            /**
             * command cleared
             */
            clearedCommand: string;
        };
        const cleanCommand: <T = any>(command: string | string[], minimistOption: T) => string;
        const getPramsFromArgs: <T = any>(args: string | string[]) => T;
        const fixUnexpectedCommandCharacters: (command: string) => string;
        const match: ({ functionOrClassName, restOfArgs, argsReplacements, classMethodsNames, }: {
            functionOrClassName: string;
            restOfArgs: string[];
            classMethodsNames?: string[];
            argsReplacements?: object;
        }) => {
            isMatch: boolean;
            restOfArgs: string[];
            methodNameToCall?: string;
        };
        const globalArgumentsParserTnp: (argsv: string[], ProjectClass: Partial<typeof BaseProject>) => string;
        const removeArg: (argumentToRemove: string, commandWithArgs: string[] | string) => string[];
        const removeArgsFromCommand: (commadWithArgs: string, argsToClear: string[]) => string;
    }
    namespace consoleGui {
        namespace question {
            const yesNo: (questionMessage: string) => Promise<boolean>;
        }
        const select: <T = string>(questionMessage: string, choices: {
            name: string;
            value: T;
        }[] | {
            [choice: string]: {
                name: string;
            };
        }, autocomplete?: boolean) => Promise<T>;
        const multiselect: (questionMessage: string, choices: {
            name: string;
            value: string;
        }[], autocomplete?: boolean, selected?: {
            name: string;
            value: string;
        }[]) => Promise<string[]>;
        const wait: (howManySecondsWait: number) => Promise<void>;
        const pressAnyKey: (message?: string) => Promise<void>;
    }
    namespace git {
        const addOriginIfNotExists: (cwd: string, origin: string, originUrl: string) => Promise<boolean>;
        const tagAndPushToGitRepo: (cwd: string, options: {
            newVersion: string;
            skipAskingQuestionBeforePush: boolean;
            isCiProcess: boolean;
            customOrigin?: string;
            skipTag?: boolean;
        }) => Promise<void>;
        const getAllTags: (cwd: string) => Promise<string[]>;
        const isValidRepoUrl: (url: string) => boolean;
        const removeTag: (cwd: string, tagName: string) => void;
        const getACTION_MSG_RESET_GIT_HARD_COMMIT: () => string;
        const lastCommitHash: (cwd: any) => string;
        const penultimateCommitHash: (cwd: any) => string;
        const checkTagExists: (tag: string, cwd?: string) => boolean;
        const lastTagVersionName: (cwd: string) => string;
        const lastTagNameForMajorVersion: (cwd: any, majorVersion: string) => string;
        const getListOfCurrentGitChanges: (cwd: string) => {
            modified: string[];
            deleted: string[];
            created: string[];
        };
        const lastTagHash: (cwd: string) => string;
        const lastCommitDate: (cwd: string) => Date | null;
        const getCommitMessageByHash: (cwd: string, hash: string) => Promise<string>;
        const getCommitMessageByIndex: (cwd: string, index: number) => Promise<string>;
        const getCommitHashByIndex: (cwd: string, index: number) => Promise<string>;
        const lastCommitMessage: (cwd: any) => string;
        const penultimateCommitMessage: (cwd: string) => Promise<string>;
        const countCommits: (cwd: string) => number;
        const hasAnyCommits: (cwd: string) => boolean;
        const isInMergeProcess: (cwd: string) => boolean;
        const getBranchesNames: (cwd: string, pattern?: string | RegExp) => string[];
        const allOrigins: (cwd: string) => {
            origin: string;
            url: string;
        }[];
        const currentBranchName: (cwd: string) => string;
        const stageAllAndCommit: (cwd: string, commitMessage?: string) => void;
        const commit: (cwd: string, commitMessage?: string) => void;
        const getOriginURL: (cwd: string, differentOriginName?: string) => string;
        const findGitRoot: (cwd: string) => string;
        const isGitRoot: (cwd: string) => boolean;
        const isInsideGitRepo: (cwd: string) => boolean;
        const resetSoftHEAD: (cwd: string, HEAD?: number) => void;
        const resetHard: (cwd: string, options?: {
            HEAD?: number;
        }) => void;
        const _pull: (cwd: string, options?: {
            branchName?: string;
            defaultHardResetCommits?: number;
        }) => void;
        const pullCurrentBranch: (cwd: string, options?: {
            askToRetry?: boolean;
            /**
             * default true, when false it will throw error instead process.exit(0)
             */
            exitOnError?: boolean;
            defaultHardResetCommits?: number;
        }) => Promise<void>;
        const meltActionCommits: (cwd: string) => number;
        const pushCurrentBranch: (cwd: string, options?: {
            force?: boolean;
            origin?: string;
            askToRetry?: boolean;
            forcePushNoQuestion?: boolean;
        }) => Promise<boolean>;
        const defaultRepoBranch: (cwd: string) => string;
        const checkoutDefaultBranch: (cwd: string) => void;
        const stageAllFiles: (cwd: string) => void;
        const stageFile: (cwd: string, fileRelativePath: string) => void;
        const stash: (cwd: string, optinos?: {
            onlyStaged?: boolean;
        }) => void;
        const rebase: (cwd: string, toBranch: string) => void;
        const stashApply: (cwd: string) => void;
        const fetch: (cwd: string, all?: boolean) => void;
        const cleanRepoFromAnyFilesExceptDotGitFolder: (cwd: string) => void;
        const checkout: (cwd: any, branchName: string, options?: {
            createBranchIfNotExists?: boolean;
            fetchBeforeCheckout?: boolean;
            switchBranchWhenExists?: boolean;
        }) => void;
        const checkoutFromTo: (checkoutFromBranch: string, targetBranch: string, origin: string, cwd: any) => void;
        const revertFileChanges: (cwd: any, fileReletivePath: string) => void;
        function extractGithubOwner(repoUrl: string): string | null;
        const getRemoteProvider: (cwd: string) => string;
        const clone: ({ cwd, url, destinationFolderName, throwErrors, override, }: {
            cwd: string;
            url: string;
            destinationFolderName?: string;
            throwErrors?: boolean;
            override?: boolean;
        }) => Promise<string>;
        const checkIfthereAreSomeUncommitedChange: (cwd: string) => boolean;
        const thereAreSomeUncommitedChangeExcept: (filesList: string[], cwd: string) => boolean;
        const uncommitedFiles: (cwd: string) => string[];
        const restoreLastVersion: (cwd: string, relativeFilePath: string) => void;
        const resetFiles: (cwd: string, ...relativePathes: string[]) => void;
        const stagedFiles: (cwd: string, outputRelatieve?: boolean) => string[];
        const getChangedFiles: (cwd: string, commitHash: string) => Promise<string[]>;
        const originHttpToSsh: (originHttp: string, verbose?: boolean) => string;
        const changeRemoteFromHttpsToSSh: (cwd: string, diffrentOriginName?: string) => Promise<void>;
        const originSshToHttp: (originSsh: string, verbose?: boolean) => string;
        const changeRemoveFromSshToHttps: (cwd: string, diffrentOriginName?: string) => Promise<void>;
        const unstageAllFiles: (cwd: string) => void;
        const getChangedFilesInCommitByHash: (cwd: string, hash: string) => Promise<string[]>;
        const getChangedFilesInCommitByIndex: (cwd: string, index: number) => Promise<string[]>;
        const changesSummary: (cwd: string, prefix?: string) => Promise<string>;
        const getUserInfo: (cwd: string, global?: boolean) => Promise<{
            name?: string;
            email?: string;
        }>;
        const setUserInfos: (optinos: {
            cwd: string;
            name: string;
            email: string;
            global?: boolean;
        }) => Promise<void>;
        const backupBranch: (cwd: string, branchName?: string) => Promise<string>;
    }
    const restartApplicationItself: (nameOfApp: string) => Promise<unknown>;
    const osIsMacOs: (versino: "big-sur" | "catalina") => boolean;
    const generatedFileWrap: (content: string) => string;
    const changeCwdWrapper: (dir: string, functionToExecure: Function) => Promise<void>;
    const changeCwd: (dir?: string) => void;
    const goToDir: (dir?: string) => boolean;
    const pressKeyOrWait: (message?: string, printWaitMessages?: number) => Promise<unknown>;
    const pressKeyAndContinue: (message?: string) => Promise<void>;
    const list: <T = any>(question: string, choices: {
        name: string;
        value: T;
    }[] | {
        [choice: string]: {
            name: string;
        };
    }) => Promise<T>;
    const multipleChoicesAsk: (question: string, choices: {
        name: string;
        value: string;
    }[], autocomplete?: boolean, selected?: {
        name: string;
        value: string;
    }[]) => Promise<string[]>;
    const input: (options: {
        defaultValue?: string;
        question: string;
        validate?: (value: string) => boolean;
    }) => Promise<string>;
    const selectChoicesAsk: <T = any>(question: string, choices: {
        name: string;
        value: T;
    }[] | {
        [choice: string]: {
            name: string;
        };
    }) => Promise<T>;
    const autocompleteAsk: <T = any>(question: string, choices: {
        name: string;
        value: T;
    }[], pageSize?: number) => Promise<T>;
    const getWorkingDirOfProcess: (PID: number) => string;
    const outputToVScode: (data: {
        label: string;
        option: string;
    }[] | string, disableEncode?: boolean) => void;
    const actionWrapper: (fn: () => void, taskName?: string) => Promise<void>;
    const terminalLine: () => string;
    const killAllNodeExceptCurrentProcess: () => Promise<void>;
    const killAllNode: () => void;
    const formatPath: (pathToFileOrFolder: string) => string;
    const prepareWatchCommand: (cmd: any) => string;
    const getStringFrom: (command: string, descriptionOfCommand?: string) => string;
    const waitForMessegeInStdout: (proc: ChildProcess, message: string) => Promise<unknown>;
    namespace arrays {
        const from: (s: string | string[]) => string[];
        const second: (arr: any) => any;
        const arrayMoveElementBefore: <T = any>(arr: any[], a: any, b: any, prop?: keyof T) => any[];
        const arrayMoveElementAfterB: <T = any>(arr: any[], a: any, b: any, prop?: keyof T) => any[];
        const moveObjectBefore: <T = any>(array: T[], target: T, before: T) => T[];
        const moveObjectAfter: <T = any>(array: T[], target: T, after: T) => T[];
        const uniqArray: <T = any>(array: any[], uniqueProperty?: keyof T) => T[];
        const sortKeys: (obj: any) => any;
        const fuzzy: <T = any>(query: string, list: T[], valueFn?: (modelFromList: T) => string) => {
            matches: any;
            results: T[];
        };
    }
    class HelpersNumber {
        /**
         * @deprecated
         * use _.random()
         */
        randomInteger: (max: any, min: any) => any;
    }
    namespace strings {
        const interpolateString: (value: string) => {
            withParameters<T = any>(parameters: T): string;
        };
        const numValue: (pixelsCss: string) => number;
        const splitIfNeed: (stringOrArr: string | string[]) => string[];
        const removeDoubleOrMoreEmptyLines: (s: string) => string;
        const plural: (word: string, amount?: number) => string;
        const singular: (word: string, amount?: number) => string;
    }
    namespace paths {
        function create(...pathPart: string[]): string;
        function PREFIX(baseFileName: any): string;
        function removeRootFolder(filePath: string): string;
        function removeExtension(filePath: string): string;
        function removeExt(filePath: string): string;
    }
    const checksum: (absolutePathToFileOrContent: string, algorithm?: "md5" | "sha1") => string;
    const getValueFromJSON: (filepath: string, lodashGetPath: string, defaultValue?: any) => any;
    const getValueFromJSONC: (filepath: string | string[], lodashGetPath: string, defaultValue?: any) => any;
    const readValueFromJson: (filepath: string, lodashGetPath: string, defaultValue?: any) => any;
    const readValueFromJsonC: (filepath: string, lodashGetPath: string, defaultValue?: any) => any;
    const setValueToJSON: (filepath: string | string[], lodashGetPath: string, value: any) => void;
    const setValueToJSONC: (filepath: string, lodashGetPath: string, value: any) => void;
    const size: (filePath: string) => number;
    const pathFromLink: (filePath: string) => string;
    const renameFolder: (from: string, to: string, cwd?: string) => void;
    const renameFiles: (from: string, to: string, cwd?: string) => void;
    const getTempFolder: () => string;
    const isPlainFileOrFolder: (filePath: string) => boolean;
    const requireUncached: (module: string) => any;
    const requireJs: (jsFilePath: string) => any;
    const tryRecreateDir: (dirpath: string) => void;
    const tryCopyFrom: (source: string, destination: string, options?: {}) => void;
    /**
     * @deprecated use .copy and then .remove on
     * source folder..
     *
     * This method is messing with parcel watcher
     * (moved files are not detected)
     */
    const move: (from: string, to: string, options?: {
        purpose?: string;
    }) => void;
    const findChildren: <T = any>(location: string, createFn: (childLocation: string) => T, options?: {
        allowAllNames: boolean;
    }) => T[];
    const findChildrenNavi: <T = any>(location: string, createFn: (childLocation: string) => T) => T[];
    const getRecrusiveFilesFrom: (dir: string, ommitFolders?: string[], options?: GetRecrusiveFilesFromOptions) => string[];
    const checkIfNameAllowedForTaonProj: (folderName: string) => boolean;
    const getLinesFromFiles: (filename: string, lineCount?: number) => Promise<string[]>;
    const getMostRecentFileName: (dir: string) => string;
    const getMostRecentFilesNames: (dir: string) => string[];
    const removeExcept: (fromPath: string, exceptFolderAndFiles: string[]) => void;
    const copyFolderOsNative: (from: string, to: string, options?: {
        removeDestination?: boolean;
    }) => Promise<void>;
    const copy: (sourceDir: string | string[], destinationDir: string | string[], options?: {
        filter?: any;
        overwrite?: boolean;
        recursive?: boolean;
        asSeparatedFiles?: boolean;
        asSeparatedFilesAllowNotCopied?: boolean;
        asSeparatedFilesSymlinkAsFile?: boolean;
        /**
         * folders to omit: example: ['src','node_modules']
         *
         * This option works only with omitFoldersBaseFolder
         */
        omitFolders?: string[];
        /**
         * absolute path for base folder for omitFolder option
         */
        omitFoldersBaseFolder?: string;
        copySymlinksAsFiles?: boolean;
        copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst?: boolean;
        useTempFolder?: boolean;
        dontAskOnError?: boolean;
    } & CopyOptionsSync) => void;
    const filterDontCopy: (basePathFoldersTosSkip: string[], projectOrBasepath: string) => (src: string, dest: string) => boolean;
    const filterOnlyCopy: (basePathFoldersOnlyToInclude: string[], projectOrBasepath: string) => (src: string, dest: string) => boolean;
    const copyFile: (sourcePath: string | string[], destinationPath: string | string[], options?: {
        transformTextFn?: (input: string) => string;
        debugMode?: boolean;
        fast?: boolean;
        dontCopySameContent?: boolean;
    }) => boolean;
    /**
     * @deprecated
     * use _.random()
     */
    const randomInteger: (max: any, min: any) => any;
    const resolve: (fileOrFolderPath: string) => string;
    const CLIWRAP: (f: Function, name: string) => Function;
    /**
     * Strips TypeScript types and emits plain JS files.
     * - No type-checking
     * - No bundling
     * - No tsconfig
     * - Preserves folder structure
     */
    const stripTsTypesIntoJs: (entrypointFolderAbsPathWithIndexTs: string, outFolderWithIndexJS: string) => Promise<void>;
    const bundleCodeIntoSingleFile: (pathToJsFile: string, outputFilePath: string, options?: {
        strategy?: "cli" | "vscode-ext" | "node-app" | "electron-app";
        /**
         * ! beforeWrite needs to return output
         */
        beforeWrite?: (options: {
            output?: string;
            copyToDestination?: (fileOrFolderAbsPath: string) => void;
        }) => string;
        additionalExternals?: string[];
        additionalReplaceWithNothing?: string[];
        skipFixingSQLlite?: boolean;
        minify?: boolean;
        /**
         * TODO
         */
        prod?: boolean;
        useTsConfig?: boolean;
        format?: BuildOptions["format"];
        target?: BuildOptions["target"];
    }) => Promise<void>;
    const uniqArray: <T = any>(array: any[], uniqueProperty?: keyof T) => T[];
    const slash: (pathFromWindowsOrUnixType: string) => string;
    const isElevated: () => Promise<void>;
    const mesureExectionInMs: (description: string, functionToExecute: Function, ...functionArguments: any[]) => Promise<number>;
    const mesureExectionInMsSync: (description: string, functionToExecute: () => void) => number;
    const waitForCondition: (conditionFn: (any: any) => boolean, howOfftenCheckInMs?: number) => Promise<unknown>;
    const getMethodName: (classObject: any, method: any) => string;
    const fixWebpackEnv: (env: Object) => void;
    const workerCalculateArray: (dataToSplit: any[], operation: (dataChunk: any[], workerNumber?: number | undefined) => Promise<void>, options?: {
        maxesForWorkes?: {
            [workerMaxes: number]: number;
        };
        workerLimit?: number;
        globals?: any;
    }) => Promise<void | any[]>;
    const checkEnvironment: (deps?: CoreModels.GlobalDependencies) => void;
    /**
     * Mixing for multiclass inheritance
     *
     * How to use It:
     *
     * class Wolverine {}
     * class Jean {}
     * export class Child {}
     * export interface MyChild implements Wolverine, Jean {}
     * applyMixing(Child,[Wolverine, Jean]);
     *
     * @param derivedCtor Target Class
     * @param baseCtors Base Classes
     */
    function applyMixins(derivedCtor: any, baseCtors: any[]): void;
}