import { type Ref } from "vue";
import { CodeLayoutGridInternal, CodeLayoutPanelInternal, type CodeLayoutPanelHosterContext, type CodeLayoutPanel, type CodeLayoutDragDropReferencePosition } from "../CodeLayout";
export interface CodeLayoutSplitNGrid extends Omit<CodeLayoutPanel, 'title'> {
    /**
     * Set whether users can close the current panel by continuously shrinking it.
     *
     * Default: false
     */
    canMinClose?: boolean;
}
export interface CodeLayoutSplitNPanel extends Omit<CodeLayoutPanel, 'visible' | 'showBadge' | 'tabStyle' | 'noHide' | 'startOpen'> {
}
/**
 * Panel type definition of SplitLayout.
 */
export declare class CodeLayoutSplitNPanelInternal extends CodeLayoutPanelInternal {
    constructor(context: CodeLayoutPanelHosterContext);
    /**
     * Panel in SplitLayout always open, no need to call the open method.
     */
    openPanel(): void;
    /**
     * Close this panel.
     *
     * This method will trigger panelClose event in SplitLayout.
     */
    closePanel(): void;
}
/**
 * Grid type definition of SplitLayout.
 *
 * Events:
 */
export declare class CodeLayoutSplitNGridInternal extends CodeLayoutGridInternal implements CodeLayoutSplitNGrid {
    constructor(context: CodeLayoutPanelHosterContext);
    /**
     * Set whether users can close the current panel by continuously shrinking it.
     */
    canMinClose: boolean;
    /**
     * Layout direction.
     */
    direction: 'vertical' | 'horizontal';
    /**
     * Child grid of this grid.
     */
    childGrid: CodeLayoutSplitNGridInternal[];
    /**
     * Add a child grid to this grid.
     * @param grid Grid to add
     * @param direction Direction, default is the direction perpendicular to the current grid
     * @returns Child grid instance.
     */
    addGrid(grid: CodeLayoutSplitNGrid, direction?: "vertical" | "horizontal" | undefined): CodeLayoutSplitNGridInternal;
    /**
     * Remove a child grid from this grid.
     * @param grid Grid to remove
     */
    removeGrid(grid: CodeLayoutSplitNGrid): CodeLayoutSplitNGrid;
    addPanel(panel: CodeLayoutSplitNPanel): CodeLayoutSplitNPanelInternal;
    moveChildGridToSelf(childGrid: CodeLayoutSplitNGridInternal): void;
    getContainerSize(): number;
    setActiveChild(child: CodeLayoutPanelInternal | null): void;
    reselectActiveChild(): void;
    childReplacedBy: CodeLayoutSplitNGridInternal | null;
    addChildGrid(child: CodeLayoutSplitNGridInternal, index?: number): void;
    addChildGrids(childs: CodeLayoutSplitNGridInternal[], startIndex?: number): void;
    removeChildGrid(child: CodeLayoutSplitNGridInternal): void;
    replaceChildGrid(oldChild: CodeLayoutSplitNGridInternal, child: CodeLayoutSplitNGridInternal): void;
    hasChildGrid(child: CodeLayoutSplitNGridInternal): boolean;
    toJson(): any;
    loadFromJson(json: any): void;
}
/**
 * Instance of SplitLayout.
 *
 * Can use like this:
 * ```
 * const splitLayout = ref<CodeLayoutSplitNInstance>();
 * const rootGrid = splitLayout.value.getRootGrid();
 * ```
 */
export interface CodeLayoutSplitNInstance {
    /**
     * Get root grid instance.
     * @returns Root grid instance.
     */
    getRootGrid(): CodeLayoutSplitNGridInternal;
    /**
     * Get panel instance by name.
     * @param name The panel name.
     * @returns Panel instance, if panel is not found in the component, return undefined
     */
    getPanelByName(name: string): CodeLayoutPanelInternal | undefined;
    /**
     * Get grid instance by name.
     * @param name The grid name.
     * @returns Grid instance, if grid is not found in the component, return undefined
     */
    getGridByName(name: string): CodeLayoutSplitNGridInternal | undefined;
    /**
     * Obtain a grid that is currently actived by user and can be used to add panels.
     */
    getActiveGird(): CodeLayoutSplitNGridInternal | undefined;
    getGridTreeDebugText(): string;
    /**
     * Activate the specified panel through Name. If the specified Name panel does not exist in the component, it has no effect.
     *
     * This method will change ActiveGird.
     *
     * @param name Panel name
     */
    activePanel(name: string): void;
    /**
     * Clear all grid.
     */
    clearLayout(): void;
    /**
     * Save current layout to JSON data.
     */
    saveLayout(): any;
    /**
     * Load the previous layout from JSON data,
     * instantiatePanelCallback will sequentially call all panels, where you can process panel data.
     */
    loadLayout(json: any, instantiatePanelCallback: (data: CodeLayoutSplitNPanel) => CodeLayoutSplitNPanel): void;
}
export interface CodeLayoutSplitLayoutContext {
    currentActiveGrid: Ref<CodeLayoutSplitNGridInternal | null>;
    activeGrid(grid: CodeLayoutSplitNGridInternal): void;
    dragDropToPanel(referencePanel: CodeLayoutPanelInternal, referencePosition: CodeLayoutDragDropReferencePosition, panel: CodeLayoutPanelInternal, toTab?: boolean): void;
}
