import { ComboBoxModel, TabModel, TreeViewItemModel } from "@genexus/chameleon-controls-library";
import { EntityData, GxOption } from "../../common/types";
declare const DESIGN_DATA_TYPE_PANELS = "panels";
declare const DESIGN_DATA_TYPE_STENCILS = "stencils";
declare const DESIGN_DATA_TYPE_IMAGES = "images";
declare const DESIGN_DATA_TYPE_DESIGN_SYSTEM = "design_system";
declare const DESIGN_DATA_TYPE_FONTS = "fonts";
export declare class GxIdeImportFromDesign {
    #private;
    el: HTMLGxIdeDesignImportElement;
    reRenderCounter: number;
    stylesAsComboBoxModel: ComboBoxModel;
    styleValue: string;
    accessTokenHasError: boolean;
    pathIsValid: boolean;
    pathIsValidChanged(pathIsValid: boolean): void;
    tabsModel: TabModel;
    activeTabs: Map<DesignType, string>;
    renderedTabs: Set<string>;
    /**
     * The design data loaded from file
     */
    designData: DesignData;
    designDataChanged(newDesignData: DesignData): void;
    /**
     * The model data loaded into the detail tree
     */
    detailTreeModel: TreeViewItemModel[];
    /**
     * If the design data is loading or not, for disabled actions
     */
    isLoading: boolean;
    /**
     * If the design data is loaded or not, for conditioning input file
     */
    isLoaded: boolean;
    /**
     * The messages receive when the file is loading
     */
    messages: MessageData[];
    /**
     * The file selected for load the design data
     */
    selectedFile: File;
    /**
     * The type of the design data selected for show it visual tabs
     */
    selectedDesignType: DesignType;
    /**
     * The item of the design data selected for show its contents on visual tabs
     */
    selectedDesignItem: any;
    /**
     * Whether to show or not the access token input field
     */
    requiresAccessToken: boolean;
    /**
     * the design data tree view data model
     */
    designDataTreeDataModel: TreeViewItemModel[];
    /**
     * Used to trigger a re-render after an item has been selected on
     * renderDesignTree, in order to set the first tab as the active tab
     * (setFirstActiveTab()), since calling this method inside
     * objectsTreeSelectedItemsChangedHandler does not always work without a
     * setTimeOut.
     */
    updateTabsActiveTab: boolean;
    /**
     * If true, images will be fitted in the container
     */
    fitImages: boolean;
    /**
     * Represents a collection of settings where each key is a specific option. Its
     * boolean value determines whether changes to that option are listened to and
     * trigger the loadCallback callback.
     */
    readonly reactiveSettings: ReactiveSettings;
    /**
     * Used to keep track of the settings values since the last loadCallback.
     * Used to know if loadCallback is required to be called again, when any
     * of these values are changed.
     */
    lastLoadCallbackSettingValues: ReactiveSettingsValues;
    /**
     * The valid extensions for the files that will be loaded in Path/URL
     * (ie.: ".fig, .sketch")
     */
    readonly extensions: string[];
    /**
     * Default value for the 'Module' field.
     */
    readonly defaultModule: EntityData;
    /**
     * The path/URL for load the design data
     */
    path: string;
    pathChanged(newPath: string): void;
    /**
     * The access token for the given path, which is not always required
     */
    accessToken: string;
    accessTokenChanged(newAccessToken: string): void;
    /**
     * The value for "Import as Web Panels" checkbox.
     */
    readonly importAsWebPanels: boolean;
    /**
     * Callback invoked when the action is executed in the Module/Folder filter.
     * It returns the information of the selected object (id and name) or
     * 'undefined' if it was canceled.
     */
    readonly selectModuleCallback: SelectModuleCallback;
    /**
     * This is a function provided by the developer that cancel the load operation.
     */
    readonly cancelCallback: CancelCallback;
    /**
     * This is a function provided by the developer that initiates the process
     * of importing a design.
     */
    readonly confirmCallback: ConfirmCallback;
    /**
     * This is a function provided by the developer that returns the list of
     * data types loaded from a file or URL.
     */
    readonly loadCallback: LoadCallback;
    /**
     * This is a function provided by the developer that returns the information
     * of a Design System type of data.
     */
    readonly loadDesignSystemCallback: LoadDesignSystemCallback;
    /**
     * This is a function provided by the developer that returns the information
     * of a Font type of data.
     */
    readonly loadFontCallback: LoadFontCallback;
    /**
     * This is a function provided by the developer that returns the information
     * of an Image System type of data.
     */
    readonly loadImageCallback: LoadImageCallback;
    /**
     * This is a function provided by the developer that returns the information
     * of a Panel type of data.
     */
    readonly loadPanelDataCallback: LoadPanelDataCallback;
    /**
     * Callback invoked to determine if accessing a design requires an authentication token.
     */
    readonly requiresAccessTokenCallback: RequiresAccessTokenCallback;
    /**
     * The styles render in the option style selector
     */
    readonly styles: GxOption[];
    stylesChanged(newStyles: GxOption[]): void;
    /**
     * This is a function provided by the developer for create an instance of a text editor.
     */
    readonly textEditorFactoryCallback: TextEditorFactoryCallback;
    componentWillLoad(): Promise<void>;
    watchMessagesHandler(newValue: boolean, oldValue: boolean): void;
    render(): void;
}
export type LoadMessageCallback = (message: MessageData) => void;
export type LoadCallback = (source: string | File, designSystem: string, importAsWebPanels: boolean, token: string | undefined, onMessage: LoadMessageCallback) => Promise<DesignData | undefined>;
export type LoadPanelDataCallback = (id: string) => Promise<DesignPanelData>;
export type LoadImageCallback = (id: string) => Promise<string>;
export type LoadFontCallback = (id: string) => Promise<string>;
export type LoadDesignSystemCallback = (id: string) => Promise<DesignSystemData>;
export type TextEditorFactoryCallback = (type: TextEditorType, parent: string, text: string) => Promise<void>;
export type SelectModuleCallback = () => Promise<EntityData | undefined>;
export type RequiresAccessTokenCallback = (source: string) => Promise<boolean>;
export type ConfirmCallback = (data: DesignImportData) => Promise<boolean>;
export type CancelCallback = () => Promise<void>;
export interface MessageData {
    type: "error" | "warning" | "info";
    text: string;
}
export interface DesignData {
    panels: DesignItemData[];
    stencils: DesignItemData[];
    images: DesignItemData[];
    designSystem: DesignItemData[];
    fonts: DesignItemData[];
    success: boolean;
}
export interface DesignItemData {
    id: string;
    name: string;
    warning?: string;
    variants?: DesignItemData[];
}
export interface DesignPanelData {
    composition: DesignPanelCompositionData;
    code?: string;
    layout?: string;
}
export interface DesignPanelCompositionData {
    preview?: string;
    controls: DesignPanelControlData[];
}
export interface DesignPanelControlData {
    name: string;
    type: string;
    leaf?: boolean;
    controls: DesignPanelControlData[];
}
export interface DesignSystemData {
    tokens: string;
    styles: string;
}
type DesignItemDataDetail = DesignPanelData | DesignSystemData | string;
export interface DesignImportData {
    panels: string[];
    stencils: string[];
    fonts: string[];
    moduleId: string;
    images: string[];
    styleName: string;
    importAsWebPanels: boolean;
}
export type DesignType = typeof DESIGN_DATA_TYPE_PANELS | typeof DESIGN_DATA_TYPE_STENCILS | typeof DESIGN_DATA_TYPE_IMAGES | typeof DESIGN_DATA_TYPE_DESIGN_SYSTEM | typeof DESIGN_DATA_TYPE_FONTS;
export type DesignObjectType = {
    [Key in DesignType]: string;
};
export type ItemLoadedInfo = {
    designType: DesignType;
    designDataDetail: DesignItemDataDetail;
};
export type TextEditorType = "code" | "html" | "styles" | "tokens";
export type ReactiveSettings = {
    path: boolean;
    style: boolean;
    module: boolean;
    importAsWebPanels: boolean;
};
export type ObjectTreeCheckedStatus = {
    all: [];
    none: ["-"];
};
type ReactiveSettingsValues = {
    path: string;
    style: string;
    moduleId: string;
    importAsWebPanels: boolean;
};
export {};
