import { FileFolderType, IFileInfo, ISaveFileResponse, ISetFileContentResponse, ITab, ITextEditorSelection } from '@ws-ui/shared';
import { ClassFileTypes } from '../root/types';
import { AppState } from '..';
import { ISettingsState } from '../settings';
import { IOpenFilePayload, ISwitchEditorPayload, ITreeItem } from './types';
interface ICreateNewFilePayload {
    fileName: string;
    type: FileFolderType;
    path: string;
    parentNode: ITreeItem;
    content?: string;
    qodly: boolean;
}
export declare function getDefaultContent(root: FileFolderType, projectSettings: ISettingsState['project']): "" | {
    metadata: {
        v: string;
        datasources: never[];
        styles: never[];
    };
    components: {
        ROOT: {
            parent: string;
            type: {
                resolvedName: string;
            };
            isCanvas: boolean;
            props: {
                airyMode: boolean;
                className: string;
                classNames: never[];
                events: never[];
            };
            displayName: string;
            custom: {};
            hidden: boolean;
            nodes: never[];
            linkedNodes: {};
        };
    };
} | "//%attributes = {}\n" | {
    metadata: {
        v: string;
        datasources: never[];
        styles: never[];
    };
    pages: {
        name: string;
        id: string;
        components: {
            ROOT: {
                type: {
                    resolvedName: string;
                };
                isCanvas: boolean;
                props: {
                    classNames: never[];
                    events: never[];
                    airyMode: boolean;
                    className: string;
                };
                displayName: string;
                custom: {};
                parent: string;
                hidden: boolean;
                nodes: never[];
                linkedNodes: {};
            };
        };
    }[];
};
export declare function getFilenameFromType(fileName: string, type: FileFolderType, qodly?: boolean): string;
export declare function castToFileFolder(type: string): FileFolderType;
export declare function getFileType(root: FileFolderType): FileFolderType;
export declare const tryEditMethod: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
    initialLineInfo: {
        line: number;
        offset?: number;
        lastModification: number;
    };
    initialSelectionInfo: {
        selection: ITextEditorSelection;
        lastModification: number;
    };
    diffContent: string;
    attributes: import('@ws-ui/shared').IMethodAttributes;
    source: import('@ws-ui/shared').ISource;
    editor: import('@ws-ui/shared').IEditor;
    ext: import('@ws-ui/shared').DebuggerFileExtension;
    kind: string;
}>>, {
    method: catalog.IMethod;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
type TCreateModelFilesPayloadDataclass = {
    type: 'dataclass';
    className: string;
    collectionName: string;
    toCreate?: ClassFileTypes;
    expand?: boolean;
};
export type TCreateModelFilesPayload = TCreateModelFilesPayloadDataclass | {
    type: 'model';
};
export declare const createModelFiles: import('@reduxjs/toolkit').AsyncThunk<void, TCreateModelFilesPayload, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const fetchFolderContent: import('@reduxjs/toolkit').AsyncThunk<ITreeItem[], string | {
    nodePath: string;
    expandDataclass?: string;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const fetchClassesFolderContent: import('@reduxjs/toolkit').AsyncThunk<ITreeItem[], void, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const fetchFolderContentWithoutExpanding: import('@reduxjs/toolkit').AsyncThunk<ITreeItem[], string | {
    nodePath: string;
    collapseIfExpanded?: boolean;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const uploadFileAndGetResponse: import('@reduxjs/toolkit').AsyncThunk<{
    status: number;
    data: unknown;
}, File, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const uploadFile: import('@reduxjs/toolkit').AsyncThunk<{
    status: number;
    fileName: string;
}, {
    file: File;
    path: string;
    parentNode: ITreeItem;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const createNewFile: import('@reduxjs/toolkit').AsyncThunk<{
    qodly: boolean;
    file: ISetFileContentResponse;
    parentNode: ITreeItem;
}, ICreateNewFilePayload, {
    state: AppState;
    rejectValue: string;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
/**
 * Returns the file path of the given file object based on its type.
 *
 * @param {ISaveFileResponse} file - The file object to get the path for.
 * @param {Partial<{ withExtension: boolean; qodly: boolean }>} [options] - Optional parameters object.
 * @param {boolean} [options.withExtension=true] - Whether to include the file extension in the path.
 * @param {boolean} [options.qodly=true] - Whether to use the qodly file extension instead of the standard one.
 * @return {string} The file path with or without extension, based on the options.
 */
export declare function getFilePath(file: ISaveFileResponse, options?: Partial<{
    withExtension: boolean;
    qodly: boolean;
}>): string;
export declare const createNewFileAndOpen: import('@reduxjs/toolkit').AsyncThunk<void, ICreateNewFilePayload, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const createNewNode: import('@reduxjs/toolkit').AsyncThunk<{
    file: import('@ws-ui/shared').IAddFolderResponse;
    parentNode: ITreeItem;
}, {
    fileName: string;
    type: FileFolderType;
    path: string;
    parentNode: ITreeItem;
}, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const fetchHTTPHandlers: import('@reduxjs/toolkit').AsyncThunk<void, void, {
    state: AppState;
    rejectValue: string;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const openFileFromLocation: import('@reduxjs/toolkit').AsyncThunk<void, void, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const switchEditor: import('@reduxjs/toolkit').AsyncThunk<void, ISwitchEditorPayload, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const openFile: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
    initialLineInfo: {
        line: number;
        offset?: number;
        lastModification: number;
    };
    initialSelectionInfo: {
        selection: ITextEditorSelection;
        lastModification: number;
    };
    diffContent: string;
    attributes: import('@ws-ui/shared').IMethodAttributes;
    source: import('@ws-ui/shared').ISource;
    editor: import('@ws-ui/shared').IEditor;
    ext: import('@ws-ui/shared').DebuggerFileExtension;
    kind: string;
}>> | null, IOpenFilePayload, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const openFileAtLine: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
    initialLineInfo: {
        line: number;
        offset?: number;
        lastModification: number;
    };
    initialSelectionInfo: {
        selection: ITextEditorSelection;
        lastModification: number;
    };
    diffContent: string;
    attributes: import('@ws-ui/shared').IMethodAttributes;
    source: import('@ws-ui/shared').ISource;
    editor: import('@ws-ui/shared').IEditor;
    ext: import('@ws-ui/shared').DebuggerFileExtension;
    kind: string;
}>>, {
    file: IFileInfo;
    line: number;
    offset?: number;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const injectContentAtLine: import('@reduxjs/toolkit').AsyncThunk<{
    path: string;
    content: string;
    line: number;
}, {
    path: string;
    content: string;
    line: number;
}, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export interface IOpenFileAtSelectionPayload {
    file: IFileInfo;
    selection: ITextEditorSelection;
}
export declare const openFileAtSelection: import('@reduxjs/toolkit').AsyncThunk<ITab<any, Partial<{
    initialLineInfo: {
        line: number;
        offset?: number;
        lastModification: number;
    };
    initialSelectionInfo: {
        selection: ITextEditorSelection;
        lastModification: number;
    };
    diffContent: string;
    attributes: import('@ws-ui/shared').IMethodAttributes;
    source: import('@ws-ui/shared').ISource;
    editor: import('@ws-ui/shared').IEditor;
    ext: import('@ws-ui/shared').DebuggerFileExtension;
    kind: string;
}>>, IOpenFileAtSelectionPayload, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const deleteFile: import('@reduxjs/toolkit').AsyncThunk<{
    deleted: boolean;
    node: ITreeItem;
}, ITreeItem, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const deleteFolder: import('@reduxjs/toolkit').AsyncThunk<{
    deleted: boolean;
    node: ITreeItem;
}, ITreeItem, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const removeFileNode: import('@reduxjs/toolkit').AsyncThunk<{
    deleted: boolean;
    node: ITreeItem;
}, ITreeItem, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const renameFile: import('@reduxjs/toolkit').AsyncThunk<{
    old: ITreeItem;
    new: ITreeItem;
}, {
    file: ITreeItem;
    newname: string;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const relocateNode: import('@reduxjs/toolkit').AsyncThunk<void, {
    draggedNode: ITreeItem;
    newLocation: ITreeItem;
}, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const duplicateNode: import('@reduxjs/toolkit').AsyncThunk<any, any, {
    state: AppState;
    dispatch?: import('redux').Dispatch | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const executeMethod: import('@reduxjs/toolkit').AsyncThunk<void | {
    [refName: string]: datasources.IComponentAction;
}, {
    methodName: string;
    namespace?: string;
    params?: {
        name: string;
        namespace?: string;
        isHardCoded?: boolean;
        type?: "string" | "number" | "object" | "date" | "array" | "bool" | undefined;
    }[];
    resultingDataSource?: {
        id?: string;
        namespace?: string;
    };
}, {
    state?: unknown;
    dispatch?: import('redux').Dispatch;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export {};
