import { ButtonHTMLAttributes } from 'react';
import { CSSProperties } from 'react';
import { Dispatch } from 'react';
import { HTMLAttributes } from 'react';
import { JSX } from 'react/jsx-runtime';
import { ReactNode } from 'react';
import { Ref } from 'react';
import { RefCallback } from 'react';
import { RefObject } from 'react';
import { SetStateAction } from 'react';

declare type BaseGridlineProps = {
    /**
     * Gridline contents (e.g. a drag handle icon).
     */
    children?: ReactNode | undefined;
    /**
     * CSS class name.
     *
     * ℹ️ Use the `data-separator` attribute for custom _hover_ and _active_ styles
     */
    className?: string | undefined;
    /**
     * When disabled, the gridline cannot be used to resize its neighboring tracks.
     *
     * ℹ️ The tracks may still be resized indirectly (e.g. by an intersecting gridline or another boundary).
     * To prevent a track from being resized at all, it needs to also be disabled.
     */
    disabled?: boolean | undefined;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement> | undefined;
    /**
     * CSS properties.
     *
     * ⚠️ Grid placement properties are managed by the gridline and cannot be overridden.
     */
    style?: CSSProperties | undefined;
};

declare type BasePanelAttributes = Omit<HTMLAttributes<HTMLDivElement>, "onResize">;

declare type BaseSeparatorAttributes = Omit<HTMLAttributes<HTMLDivElement>, "role" | "tabIndex">;

/**
 * A Cell occupies one or more tracks (columns and rows) within a Grid.
 * Cells are resized along with the tracks they occupy.
 *
 * Cell elements always include the following attributes:
 *
 * ```html
 * <div data-cell data-testid="cell-id-prop" id="cell-id-prop">
 * ```
 *
 * ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
 *
 * ⚠️ Cell elements must be direct DOM children of their parent Grid elements.
 */
export declare const Cell: typeof CellComponent & {
    displayName: string;
};

declare function CellComponent({ children, className, column, columnSpan, elementRef: elementRefProp, id: idProp, row, rowSpan, style, ...rest }: CellProps): JSX.Element;

export declare type CellProps = HTMLAttributes<HTMLDivElement> & {
    /**
     * Cell contents.
     */
    children?: ReactNode | undefined;
    /**
     * CSS class name.
     */
    className?: string | undefined;
    /**
     * Index of the (first) column this cell occupies.
     */
    column: number;
    /**
     * Number of columns this cell spans; defaults to 1.
     *
     * @default 1
     */
    columnSpan?: number | undefined;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement | null> | undefined;
    /**
     * Uniquely identifies this cell within the parent grid.
     * Falls back to `useId` when not provided.
     *
     * ℹ️ This value will also be assigned to the `id` and `data-testid` attributes (an explicit `data-testid` prop will take precedence).
     */
    id?: string | number | undefined;
    /**
     * Index of the (first) row this cell occupies.
     */
    row: number;
    /**
     * Number of rows this cell spans; defaults to 1.
     *
     * @default 1
     */
    rowSpan?: number | undefined;
    /**
     * CSS properties.
     *
     * ⚠️ Grid placement properties are managed by the Cell and cannot be overridden.
     */
    style?: CSSProperties | undefined;
};

/**
 * Arguments passed to the Workspace's `disableDrop` prop.
 *
 * While a tabset is dragged, `disableDrop` is called once for each of its tabs (with the target that tab would be dropped at),
 * and the target is rejected if any call returns `true`.
 */
export declare type DisableDropArgs<TabData = unknown, TabsetData = unknown> = {
    model: WorkspaceModel<TabData, TabsetData>;
    /**
     * Where the tab (or tabset) is dragged from:
     * - `"local"`: this workspace
     * - `"external"`: another workspace with the same `dragGroup` (e.g. in another window)
     */
    source: "external" | "local";
    /**
     * The tab being dropped.
     *
     * ⚠️ This is `undefined` when a tabset without tabs (one with the `keepWhenEmpty` flag) is dragged.
     */
    tab: TabNode<TabData> | undefined;
    /**
     * The tabset being dragged, when a whole tabset is dragged (rather than a single tab).
     */
    tabset: TabsetNode<TabData, TabsetData> | undefined;
    target: TabDropTarget;
};

/**
 * State passed to the Workspace's `renderDragPreview` and `renderTabsetDragPreview` props.
 */
export declare type DragPreviewState = {
    /**
     * `true` while the pointer is outside of the window and releasing it would tear off the tab (or tabset);
     * only when the Workspace has an `onTearOff` prop.
     *
     * ℹ️ This is never set for mouse drags when the Workspace has a `dragGroup` prop, since the pointer can't be followed outside of the window then.
     */
    isTearOff: boolean;
};

/**
 * A tabset that floats above the workspace's layout (see `WorkspaceModel.floating`), e.g. a notepad that can be moved out of the way of the content beneath it.
 *
 * ℹ️ Floating tabsets are positioned (and sized) in pixels, so they keep their size when the workspace is resized.
 * They're shown with their headers within the workspace's layout (so they can always be dragged back), and the rest of them is clipped to it;
 * their positions aren't changed to fit, though, so they're shown where they were again once that fits (e.g. when the workspace is made larger again).
 *
 * ℹ️ Unlike tabsets within the layout, floating tabsets can't be split or maximized, and their maximum sizes (`maxWidth` and `maxHeight`) are ignored.
 *
 * ℹ️ Floating tabsets can always be collapsed (with the imperative API, e.g. `useParentTabset().collapse()`), so they don't have the `collapsible` flag.
 * A collapsed floating tabset is only as large as its header across it (e.g. as tall as its tabs, when they're placed on top), and can only be resized along it;
 * its `width` and `height` are the size it expands to. Like tabsets in the layout, clicking a tab (or the empty space in the header) of a collapsed floating tabset expands it.
 */
export declare type FloatingTabsetNode<TabData = unknown, TabsetData = unknown> = Omit<TabsetNode<TabData, TabsetData>, "collapsible" | "size"> & FloatingTabsetRect;

export declare type FloatingTabsetNodeInput<TabData = unknown, TabsetData = unknown> = Omit<FloatingTabsetNode<TabData, TabsetData>, "id"> & {
    id?: string | undefined;
};

/**
 * Position and size of a floating tabset (see `WorkspaceModel.floating`), in pixels.
 *
 * ℹ️ Positions are relative to the top left corner of the workspace's layout (within the root element's padding), even in a right-to-left layout.
 */
export declare type FloatingTabsetRect = {
    /**
     * Distance from the left edge of the workspace's layout to the tabset's left edge.
     */
    x: number;
    /**
     * Distance from the top edge of the workspace's layout to the tabset's top edge.
     */
    y: number;
    /**
     * Width of the tabset (including its header).
     */
    width: number;
    /**
     * Height of the tabset (including its header).
     */
    height: number;
};

/**
 * A Grid arranges resizable Cells in two dimensions.
 * Columns can be resized horizontally and rows can be resized vertically;
 * dragging the point where a column boundary and a row boundary intersect resizes both.
 *
 * Size constraints (e.g. min/max size, collapsible) are specified per track (column or row),
 * using the same format as Panel props.
 *
 * Cells can span multiple columns and/or rows.
 * Track boundaries cannot be resized alongside of a cell that spans across them.
 *
 * Grid elements always include the following attributes:
 *
 * ```html
 * <div data-grid data-testid="grid-id-prop" id="grid-id-prop">
 * ```
 *
 * ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
 */
export declare const Grid: typeof GridComponent & {
    displayName: string;
};

/**
 * A Grid has two independently resizable axes:
 * - "column" tracks are resized horizontally
 * - "row" tracks are resized vertically
 */
export declare type GridAxis = "column" | "row";

declare function GridComponent({ children, className, columns, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, gridRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, onLayoutChanged: onLayoutChangedUnstable, resizeTargetMinimumSize, rows, style, ...rest }: GridProps): JSX.Element;

/**
 * Imperative Grid API.
 *
 * ℹ️ The `useGridRef` and `useGridCallbackRef` hooks are exported for convenience in TypeScript projects.
 */
export declare interface GridImperativeHandle {
    /**
     * Get the Grid's current layout: maps of column and row ids to percentages (0..100)
     *
     * @return Map of column ids to percentages and map of row ids to percentages (specified as numbers ranging between 0..100)
     */
    getLayout: () => {
        columns: {
            [columnId: string]: number;
        };
        rows: {
            [rowId: string]: number;
        };
    };
    /**
     * Imperative API for the column or row with the specified id (see `GridTrackImperativeHandle`).
     *
     * ℹ️ Tracks without an explicit `id` use their index (e.g. `"0"`) as their id.
     *
     * ⚠️ An error will be thrown if the Grid does not contain a matching track.
     *
     * @param axis "column" or "row"
     * @param id Track id
     */
    getTrackById: (axis: "column" | "row", id: string | number) => GridTrackImperativeHandle;
    /**
     * Imperative API for the column or row at the specified index (see `GridTrackImperativeHandle`).
     *
     * ℹ️ The index is resolved to a track id when this method is called; the returned API continues to refer to that id.
     * Tracks without an explicit `id` use their index as their id,
     * so specify ids if the API needs to refer to the same track after tracks are added or removed before it.
     *
     * ⚠️ An error will be thrown if the index is out of range.
     *
     * @param axis "column" or "row"
     * @param index Track index (starting at 0)
     */
    getTrackByIndex: (axis: "column" | "row", index: number) => GridTrackImperativeHandle;
    /**
     * Set a new layout for one or both of the Grid's axes.
     *
     * @param layout Map of column and/or row ids to percentages (numbers between 0..100)
     * @return Applied layout (after validation)
     */
    setLayout: (layout: {
        columns?: {
            [columnId: string]: number;
        } | undefined;
        rows?: {
            [rowId: string]: number;
        } | undefined;
    }) => {
        columns: {
            [columnId: string]: number;
        };
        rows: {
            [rowId: string]: number;
        };
    };
}

/**
 * Grid layouts are a pair of (1-dimensional) layouts, one per axis.
 * Each is a map of track id to percentage (0..100) of the space available to that axis.
 */
export declare type GridLayout = {
    columns: Layout;
    rows: Layout;
};

/**
 * Resizes the columns (or rows) of a Grid.
 *
 * For example:
 *
 * ```tsx
 * // Rendered between columns 0 and 1 and spans all rows
 * <Gridline type="column" column={1} />
 * ```
 *
 * ```tsx
 * // Rendered between rows 0 and 1 and spans all columns
 * <Gridline type="row" row={1} />
 * ```
 *
 * ```tsx
 * // Rendered between columns 0 and 1 alongside of row 2 only
 * <Gridline type="column" column={1} row={2} rowSpan={1} />
 * ```
 *
 * A gridline should not be rendered alongside of a Cell that spans across its boundary
 * (this includes disabled gridlines; in development builds, an error will be logged to the console);
 * render multiple gridlines along the same boundary instead (e.g. before and after the spanning Cell).
 *
 * ℹ️ Once a boundary contains a gridline, it can only be resized using gridlines;
 * the parts of the boundary that aren't alongside of a gridline can't be dragged.
 *
 * Where column and row gridlines intersect, dragging resizes both axes.
 *
 * Gridlines are not _required_ but they are _recommended_ as they improve keyboard accessibility.
 *
 * Gridline elements always include the following attributes:
 *
 * ```html
 * <div aria-orientation="vertical" data-separator role="separator">
 * ```
 *
 * ℹ️ Column gridlines are vertical (`aria-orientation="vertical"`) and row gridlines are horizontal (`aria-orientation="horizontal"`).
 *
 * ℹ️ In addition to the attributes shown above, gridlines also render all required [WAI-ARIA properties](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/separator_role#associated_wai-aria_roles_states_and_properties).
 *
 * ⚠️ Gridline elements must be direct DOM children of their parent Grid elements.
 *
 * ℹ️ Gridlines rendered by another component (rather than directly within the Grid) aren't detected until they mount, so server-rendered layouts may shift slightly during hydration.
 */
export declare const Gridline: typeof GridlineComponent & {
    displayName: string;
};

declare function GridlineComponent(props: GridlineProps): JSX.Element;

export declare type GridlineProps = BaseGridlineProps & ({
    /**
     * Column gridlines are vertical; they resize the columns on either side of them.
     * Row gridlines are horizontal; they resize the rows on either side of them.
     */
    type: "column";
    /**
     * When `type` is "column", the gridline is rendered along the leading (left) edge of this column
     * (between it and the previous column); must be greater than 0 and less than the number of columns.
     */
    column: number;
    /**
     * When `type` is "column", index of the first row the gridline is rendered alongside of; defaults to 0.
     */
    row?: number | undefined;
    /**
     * Number of rows a column gridline spans; defaults to all rows (starting from `row`).
     *
     * ℹ️ Gridlines can span a subset of rows in order to avoid cells that span across the boundary they sit on;
     * multiple gridlines can be rendered along the same boundary (e.g. above and below a spanning cell).
     */
    rowSpan?: number | undefined;
} | {
    /**
     * Column gridlines are vertical; they resize the columns on either side of them.
     * Row gridlines are horizontal; they resize the rows on either side of them.
     */
    type: "row";
    /**
     * When `type` is "row", index of the first column the gridline is rendered alongside of; defaults to 0.
     */
    column?: number | undefined;
    /**
     * Number of columns a row gridline spans; defaults to all columns (starting from `column`).
     *
     * ℹ️ Gridlines can span a subset of columns in order to avoid cells that span across the boundary they sit on;
     * multiple gridlines can be rendered along the same boundary (e.g. before and after a spanning cell).
     */
    columnSpan?: number | undefined;
    /**
     * When `type` is "row", the gridline is rendered along the leading (top) edge of this row
     * (between it and the previous row); must be greater than 0 and less than the number of rows.
     */
    row: number;
});

export declare type GridProps = HTMLAttributes<HTMLDivElement> & {
    /**
     * Cell and Gridline components that comprise this grid.
     *
     * ⚠️ Cell and Gridline elements must be direct DOM children of their parent Grid element.
     */
    children?: ReactNode | undefined;
    /**
     * CSS class name.
     */
    className?: string | undefined;
    /**
     * Grid columns; either the number of columns or an array of size constraints (one per column).
     */
    columns: number | GridTrackProps[];
    /**
     * Default layout for either or both of the Grid's axes.
     *
     * ℹ️ This value allows layouts to be remembered between page reloads.
     */
    defaultLayout?: Partial<GridLayout> | undefined;
    /**
     * This library sets custom mouse cursor styles to indicate drag state.
     * Use this prop to disable that behavior for this grid.
     */
    disableCursor?: boolean | undefined;
    /**
     * Disable resize functionality.
     */
    disabled?: boolean | undefined;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement | null> | undefined;
    /**
     * Exposes the following imperative API:
     * - `getLayout(): GridLayout`
     * - `getTrackById(axis: "column" | "row", id: string | number): GridTrackImperativeHandle`
     * - `getTrackByIndex(axis: "column" | "row", index: number): GridTrackImperativeHandle`
     * - `setLayout(layout: Partial<GridLayout>): GridLayout`
     *
     * ℹ️ The `useGridRef` and `useGridCallbackRef` hooks are exported for convenience in TypeScript projects.
     */
    gridRef?: Ref<GridImperativeHandle | null> | undefined;
    /**
     * Uniquely identifies this grid within an application.
     * Falls back to `useId` when not provided.
     *
     * ℹ️ This value will also be assigned to the `id` and `data-testid` attributes (an explicit `data-testid` prop will take precedence).
     */
    id?: string | number | undefined;
    /**
     * Called when the Grid's layout is changing.
     *
     * ⚠️ For layout changes caused by pointer events, this method is called each time the pointer is moved.
     * For most cases, it is recommended to use the `onLayoutChanged` callback instead.
     */
    onLayoutChange?: ((layout: GridLayout) => void) | undefined;
    /**
     * Called after the Grid's layout has been changed.
     *
     * ℹ️ For layout changes caused by pointer events, this callback is not called until the pointer has been released.
     * This callback is recommended for saving layouts to storage.
     */
    onLayoutChanged?: ((layout: GridLayout, meta: LayoutChangedMeta<GridLayout>) => void) | undefined;
    /**
     * Minimum size of the resizable hit target area (either a `Gridline` or a `Cell` edge).
     * This threshold ensures targets are large enough to avoid mis-clicks.
     *
     * ℹ️ Refer to the `Group` prop of the same name for more information.
     *
     * @default { coarse: 20, fine: 10 }
     */
    resizeTargetMinimumSize?: {
        coarse: number;
        fine: number;
    };
    /**
     * Grid rows; either the number of rows or an array of size constraints (one per row).
     */
    rows: number | GridTrackProps[];
    /**
     * CSS properties.
     *
     * ⚠️ Grid template and display properties are managed by the Grid and cannot be overridden.
     */
    style?: CSSProperties | undefined;
};

/**
 * Imperative API for an individual Grid track (column or row); returned by `GridImperativeHandle.getTrackById` and `GridImperativeHandle.getTrackByIndex`.
 *
 * ℹ️ Sizes are relative to the space available to the track's axis
 * (e.g. the width of the Grid, minus gaps and gridlines, for a column).
 */
export declare interface GridTrackImperativeHandle {
    /**
     * Collapse the track to its `collapsedSize`.
     *
     * ⚠️ This method will do nothing if the track is not `collapsible` or if it is already collapsed.
     */
    collapse: () => void;
    /**
     * Expand a collapsed track to its most recent size.
     *
     * ℹ️ If restoring that size would require collapsing another track, the track expands to the largest size that fits instead (as long as that is at least its `minSize`).
     *
     * ⚠️ This method will do nothing if the track is not currently collapsed.
     */
    expand: () => void;
    /**
     * Get the current size of the track in pixels as well as a percentage of its axis (0..100).
     *
     * @return Track size (in pixels and as a percentage of its axis)
     */
    getSize: () => {
        asPercentage: number;
        inPixels: number;
    };
    /**
     * The track is currently collapsed.
     */
    isCollapsed: () => boolean;
    /**
     * Update the track's size.
     *
     * Size can be in the following formats:
     * - Percentage of the axis (0..100)
     * - Pixels
     * - Relative font units (em, rem)
     * - Viewport relative units (vh, vw)
     *
     * ℹ️ Numeric values are assumed to be pixels.
     * Strings without explicit units are assumed to be percentages (0%..100%).
     * Percentages may also be specified as strings ending with "%" (e.g. "33%")
     * Pixels may also be specified as strings ending with the unit "px".
     * Other units should be specified as strings ending with their CSS property units (e.g. 1rem, 50vh)
     *
     * @param size New track size
     */
    resize: (size: number | string) => void;
}

/**
 * Size constraints for a Grid track (a column or a row).
 *
 * Tracks support the same constraints as Panels,
 * using the same [interpretation rules](https://react-resizable-panels.vercel.app/examples/size-constraints):
 * - Numbers are interpreted as pixels (e.g. `minSize={200}` is 200 pixels)
 * - Strings without explicit units are interpreted as percentage (e.g. `minSize="50"` is 50 percent)
 * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
 */
export declare type GridTrackProps = PanelConstraintProps & {
    /**
     * Uniquely identifies this track within its axis; defaults to the track's index.
     *
     * ℹ️ This value is used as the key for this track in the Grid's layout.
     */
    id?: string | number | undefined;
};

/**
 * A Group wraps a set of resizable Panel components.
 * Group content can be resized _horizontally_ or _vertically_.
 *
 * Group elements always include the following attributes:
 *
 * ```html
 * <div data-group data-testid="group-id-prop" id="group-id-prop">
 * ```
 *
 * ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
 */
export declare const Group: typeof GroupComponent & {
    displayName: string;
};

declare function GroupComponent({ children, className, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, onLayoutChanged: onLayoutChangedUnstable, orientation, resizePreviewMode, resizeTargetMinimumSize, style, ...rest }: GroupProps): JSX.Element;

/**
 * Imperative Group API.
 *
 * ℹ️ The `useGroupRef` and `useGroupCallbackRef` hooks are exported for convenience in TypeScript projects.
 */
export declare interface GroupImperativeHandle {
    /**
     * Get the Group's current layout as a map of Panel id to percentage (0..100)
     *
     * @return Map of Panel id to percentages (specified as numbers ranging between 0..100)
     */
    getLayout: () => {
        [panelId: string]: number;
    };
    /**
     * Set a new layout for the Group
     *
     * @param layout Map of Panel id to percentage (a number between 0..100)
     * @return Applied layout (after validation)
     */
    setLayout: (layout: {
        [panelId: string]: number;
    }) => Layout;
}

export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
    /**
     * Panel and Separator components that comprise this group.
     */
    children?: ReactNode | undefined;
    /**
     * CSS class name.
     */
    className?: string | undefined;
    /**
     * Default layout for the Group.
     *
     * ℹ️ This value allows layouts to be remembered between page reloads.
     *
     * ⚠️ Slight layout shift may occur when server-rendering panels with percentage-based default sizes.
     * Refer to the documentation for suggestions on how to minimize the impact of this.
     */
    defaultLayout?: Layout | undefined;
    /**
     * This library sets custom mouse cursor styles to indicate drag state.
     * Use this prop to disable that behavior for Panels and Separators in this group.
     */
    disableCursor?: boolean | undefined;
    /**
     * Disable resize functionality.
     */
    disabled?: boolean | undefined;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement | null> | undefined;
    /**
     * Exposes the following imperative API:
     * - `getLayout(): Layout`
     * - `setLayout(layout: Layout): Layout`
     *
     * ℹ️ The `useGroupRef` and `useGroupCallbackRef` hooks are exported for convenience in TypeScript projects.
     */
    groupRef?: Ref<GroupImperativeHandle | null> | undefined;
    /**
     * Uniquely identifies this group within an application.
     * Falls back to `useId` when not provided.
     *
     * ℹ️ This value will also be assigned to the `id` and `data-testid` attributes (an explicit `data-testid` prop will take precedence).
     */
    id?: string | number | undefined;
    /**
     * Called when the Group's layout is changing.
     *
     * ⚠️ For layout changes caused by pointer events, this method is called each time the pointer is moved.
     * For most cases, it is recommended to use the `onLayoutChanged` callback instead.
     */
    onLayoutChange?: (layout: Layout) => void | undefined;
    /**
     * Called after the Group's layout has been changed.
     *
     * ℹ️ For layout changes caused by pointer events, this callback is not called until the pointer has been released.
     * This callback is recommended for saving layouts to storage.
     *
     * ℹ️ The second argument contains meta information about the layout change.
     * The `isUserInteraction` attribute signals whether the resize was caused by direct user input.
     * It is true for resizes caused by pointer or keyboard input
     * and false for other triggers (e.g. imperative API calls, initial mount, etc.)
     * The `requestedLayout` attribute is the layout before constraints were applied for the current Group size;
     * prefer it when persisting layouts.
     */
    onLayoutChanged?: (layout: Layout, meta: LayoutChangedMeta) => void;
    /**
     * Controls whether pointer dragging updates `Panel` sizes immediately,
     * or renders overlay separator previews until the pointer is released.
     *
     * Defaults to `"panel"` (immediate resizing); `"separator"` defers resizing until release.
     *
     * Customize previews using the `SeparatorOverlay` component.
     *
     * @default "panel"
     */
    resizePreviewMode?: ResizePreviewMode | undefined;
    /**
     * Minimum size of the resizable hit target area (either `Separator` or `Panel` edge).
     * This threshold ensures targets are large enough to avoid mis-clicks.
     *
     * - Coarse inputs (typically a finger on a touchscreen) have reduced accuracy;
     * to ensure accessibility and ease of use, hit targets should be larger to prevent mis-clicks.
     * - Fine inputs (typically a mouse) can be smaller
     *
     * ℹ️ [Apple interface guidelines](https://developer.apple.com/design/human-interface-guidelines/accessibility) suggest `20pt` (`27px`) on desktops and `28pt` (`37px`) for touch devices.
     * In practice this seems to be much larger than many of their own applications use though.
     *
     * @default { coarse: 20, fine: 10 }
     */
    resizeTargetMinimumSize?: {
        coarse: number;
        fine: number;
    };
    /**
     * Specifies the resizable orientation ("horizontal" or "vertical"); defaults to "horizontal"
     *
     * @default "horizontal"
     */
    orientation?: "horizontal" | "vertical" | undefined;
    /**
     * CSS properties.
     *
     * ⚠️ The default inline styles cannot be overridden, except for [`overflow`](https://react-resizable-panels.vercel.app/examples/overflow).
     */
    style?: CSSProperties | undefined;
};

/**
 * What happens to the content of tabs that are not selected:
 * - `"keep-mounted"`: content stays mounted (and its effects keep running)
 * - `"activity"`: content stays mounted but is rendered within a hidden React `<Activity>` boundary, so its effects are unmounted;
 *   requires React 19.2 (falls back to `"keep-mounted"` otherwise)
 * - `"unmount"`: content is unmounted
 */
export declare type HiddenTabBehavior = "activity" | "keep-mounted" | "unmount";

/**
 * Caches and returns matchMedia()'s computed value for "pointer:coarse"
 */
export declare function isCoarsePointer(): boolean;

/**
 * Map of item (e.g. Panel) id to size (a percentage between 0..100)
 */
export declare type Layout = {
    [id: string]: number;
};

/**
 * Metadata describing a completed layout change, passed as the second argument to the `onLayoutChanged` callback.
 * See #716.
 */
export declare type LayoutChangedMeta<RequestedLayout = Layout> = {
    /**
     * `true` when the change was caused by the user directly manipulating a separator (keyboard or pointer)
     * `false` for every other source (imperative API calls, constraint recompute, default-size change, initial mount),
     * because the library cannot attribute the caller's intent there.
     */
    isUserInteraction: boolean;
    /**
     * Layout most recently requested by the user or application (e.g. pointer or keyboard input, imperative API, default layout)
     * before constraints were applied for the current size.
     *
     * This will differ from the validated layout when constraints temporarily override the requested layout,
     * e.g. a panel with a pixel-based `minSize` taking up a larger percentage of a small Group.
     * The requested layout is restored if the Group grows back to a size where it satisfies all constraints.
     *
     * ℹ️ When saving layouts to storage, prefer this value to the validated layout.
     */
    requestedLayout?: RequestedLayout | undefined;
};

export declare type LayoutStorage = Pick<Storage, "getItem" | "setItem">;

/**
 * Validates a model (e.g. one saved from `onModelChanged` and loaded from storage) and tidies it,
 * the same way the `defaultModel` prop and the `setModel` method do:
 * - Removes empty tabsets (other than an empty root tabset, and tabsets with the `keepWhenEmpty` flag)
 * - Replaces splits with a single child with that child, and merges splits into parent splits with the same orientation
 * - Scales sizes so they add up to 100 (when all siblings have percentage sizes)
 * - Fixes selections (and recently selected tabs) of tabs that no longer exist
 * - Expands tabsets that can't be collapsed (e.g. the only tabset in the workspace)
 * - Removes floating tabsets that are empty, and fixes their invalid positions and sizes
 * - Clears the maximized tabset if it no longer exists
 * - Assigns ids to splits and tabsets that don't have them
 *
 * ℹ️ The optional `mapTab` function is called for each tab before the model is tidied,
 * e.g. to refresh a saved tab's title and flags from code; tabs it returns `null` for are removed.
 *
 * @returns The tidied model, or `null` if the value isn't a model (e.g. saved data that's corrupt, or saved by an unsupported version)
 */
export declare function normalizeWorkspaceModel<TabData = unknown, TabsetData = unknown>(value: unknown, { mapTab }?: {
    mapTab?: ((tab: TabNode<TabData>) => TabNode<TabData> | null) | undefined;
}): WorkspaceModel<TabData, TabsetData> | null;

export declare type OnGroupLayoutChange = GroupProps["onLayoutChange"];

export declare type OnPanelResize = PanelProps["onResize"];

/**
 * Types shared by the resize machinery (layout math, pointer and keyboard interactions, cursors, etc.)
 * which is used by both the Group and Grid components.
 *
 * - A "resize axis" is a set of items that can be resized along one orientation;
 *   e.g. a Group (whose items are Panels) or one axis of a Grid (whose items are columns or rows).
 * - A "resize item" is one of those items (e.g. a Panel or a Grid track).
 * - A separator (e.g. a Separator or a Gridline) resizes the items on either side of it.
 */
/**
 * Orientation loosely relates to the `aria-orientation` attribute.
 * It determines how items are laid out and the direction they can be resized in.
 */
export declare type Orientation = "horizontal" | "vertical";

/**
 * A Panel wraps resizable content and can be configured with min/max size constraints and collapsible behavior.
 *
 * Panel size props can be in the following formats:
 * - Percentage of the parent Group (0..100)
 * - Pixels
 * - Relative font units (em, rem)
 * - Viewport relative units (vh, vw)
 *
 * ℹ️ Numeric values are assumed to be pixels.
 * Strings without explicit units are assumed to be percentages (0%..100%).
 * Percentages may also be specified as strings ending with "%" (e.g. "33%")
 * Pixels may also be specified as strings ending with the unit "px".
 * Other units should be specified as strings ending with their CSS property units (e.g. 1rem, 50vh)
 *
 * Panel elements always include the following attributes:
 *
 * ```html
 * <div data-panel data-testid="panel-id-prop" id="panel-id-prop">
 * ```
 *
 * ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
 *
 * ⚠️ Panel elements must be direct DOM children of their parent Group elements.
 */
export declare const Panel: typeof PanelComponent & {
    displayName: string;
};

declare function PanelComponent({ children, className, collapsedSize, collapsedThreshold, collapsible, defaultSize, disabled, elementRef: elementRefProp, groupResizeBehavior, id: idProp, maxSize, minSize, onResize: onResizeUnstable, panelRef, style, ...rest }: PanelProps): JSX.Element;

/**
 * Size constraints may be specified in a variety of ways:
 * - Percentage of the parent Group (0..100)
 * - Pixels
 * - Relative font units (em, rem)
 * - Viewport relative units (vh, vw)
 *
 * Numeric values are assumed to be pixels.
 * Strings without explicit units are assumed to be percentages (0%..100%).
 *
 * Percentages may also be specified as strings ending with "%" (e.g. "33%")
 * Pixels may also be specified as strings ending with the unit "px".
 *
 * Other units should be specified as strings ending with their CSS property units (e.g. 1rem, 50vh)
 */
declare type PanelConstraintProps = Pick<PanelProps, "collapsedSize" | "collapsedThreshold" | "collapsible" | "defaultSize" | "disabled" | "groupResizeBehavior" | "maxSize" | "minSize">;

/**
 * Imperative Panel API
 *
 * ℹ️ The `usePanelRef` and `usePanelCallbackRef` hooks are exported for convenience in TypeScript projects.
 */
export declare interface PanelImperativeHandle {
    /**
     * Collapse the Panel to its `collapsedSize`.
     *
     * ⚠️ This method will do nothing if the Panel is not `collapsible` or if it is already collapsed.
     */
    collapse: () => void;
    /**
     * Expand a collapsed Panel to its most recent size.
     *
     * ℹ️ If restoring that size would require collapsing another Panel, the Panel expands to the largest size that fits instead (as long as that is at least its `minSize`).
     *
     * ⚠️ This method will do nothing if the Panel is not currently collapsed.
     */
    expand: () => void;
    /**
     * Get the current size of the Panel in pixels as well as a percentage of the parent group (0..100).
     *
     * @return Panel size (in pixels and as a percentage of the parent group)
     */
    getSize: () => {
        asPercentage: number;
        inPixels: number;
    };
    /**
     * The Panel is currently collapsed.
     */
    isCollapsed: () => boolean;
    /**
     * Update the Panel's size.
     *
     * Size can be in the following formats:
     * - Percentage of the parent Group (0..100)
     * - Pixels
     * - Relative font units (em, rem)
     * - Viewport relative units (vh, vw)
     *
     * ℹ️ Numeric values are assumed to be pixels.
     * Strings without explicit units are assumed to be percentages (0%..100%).
     * Percentages may also be specified as strings ending with "%" (e.g. "33%")
     * Pixels may also be specified as strings ending with the unit "px".
     * Other units should be specified as strings ending with their CSS property units (e.g. 1rem, 50vh)
     *
     * @param size New panel size
     */
    resize: (size: number | string) => void;
}

export declare type PanelProps = BasePanelAttributes & {
    /**
     * CSS class name.
     *
     * ⚠️ Class is applied to nested `HTMLDivElement` to avoid styles that interfere with Flex layout.
     */
    className?: string | undefined;
    /**
     * Panel size when collapsed; defaults to 0%.
     *
     * @default "0%"
     */
    collapsedSize?: number | string | undefined;
    /**
     * Distance a collapsible panel must be resized past its `minSize` to collapse,
     * or past its `collapsedSize` to expand.
     * Defaults to half the distance between `collapsedSize` and `minSize`.
     *
     * For example if a panel declares `collapsedSize="5%"`, `collapsedThreshold="5%"`, and `minSize="25%"`,
     * it will collapse when resized below 20% and expand when resized above 10%.
     *
     * ℹ️ Interpretation rules:
     * - Numbers are interpreted as pixels (e.g. `minSize={200}` is 200 pixels)
     * - Strings without explicit units are interpreted as percentage (e.g. `minSize="50"` is 50 percent)
     * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
     */
    collapsedThreshold?: number | string | undefined;
    /**
     * This panel can be collapsed.
     *
     * ℹ️ A collapsible panel will collapse when its size is less than the specified `minSize`
     *
     * @default false
     */
    collapsible?: boolean | undefined;
    /**
     * Default size of Panel within its parent group; default is auto-assigned based on the total number of Panels.
     *
     * ℹ️ Interpretation rules:
     * - Numbers are interpreted as pixels (e.g. `defaultSize={200}` is 200 pixels)
     * - Strings without explicit units are interpreted as percentage (e.g. `defaultSize="50"` is 50 percent)
     * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
     *
     * ⚠️ Percentage based sizes may cause slight layout shift when server-rendering.
     * For more information see the documentation.
     */
    defaultSize?: number | string | undefined;
    /**
     * When disabled, a panel cannot be resized either directly or indirectly (by resizing another panel).
     */
    disabled?: boolean | undefined;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement | null> | undefined;
    /**
     * How should this Panel behave if the parent Group is resized?
     * Defaults to `preserve-relative-size`.
     *
     * - `preserve-relative-size`: Retain the current relative size (as a percentage of the Group)
     * - `preserve-pixel-size`: Retain its current size (in pixels)
     *
     * ℹ️ Panel min/max size constraints may impact this behavior.
     *
     * ⚠️ A Group must contain at least one Panel with `preserve-relative-size` resize behavior.
     *
     * @default "preserve-relative-size"
     */
    groupResizeBehavior?: "preserve-relative-size" | "preserve-pixel-size" | undefined;
    /**
     * Uniquely identifies this panel within the parent group.
     * Falls back to `useId` when not provided.
     *
     * ℹ️ This prop is used to associate persisted group layouts with the original panel.
     *
     * ℹ️ This value will also be assigned to the `id` and `data-testid` attributes (an explicit `data-testid` prop will take precedence).
     */
    id?: string | number | undefined;
    /**
     * Maximum size of Panel within its parent group; defaults to `"100%"`.
     *
     * ℹ️ Interpretation rules:
     * - Numbers are interpreted as pixels (e.g. `maxSize={200}` is 200 pixels)
     * - Strings without explicit units are interpreted as percentage (e.g. `maxSize="50"` is 50 percent)
     * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
     *
     * @default "100%"
     */
    maxSize?: number | string | undefined;
    /**
     * Minimum size of Panel within its parent group; defaults to 0%.
     *
     * ℹ️ Interpretation rules:
     * - Numbers are interpreted as pixels (e.g. `minSize={200}` is 200 pixels)
     * - Strings without explicit units are interpreted as percentage (e.g. `minSize="50"` is 50 percent)
     * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
     *
     * @default "0%"
     */
    minSize?: number | string | undefined;
    /**
     * Called when panel sizes change.
     *
     * @param panelSize Panel size (both as a percentage of the parent Group and in pixels)
     * @param id Panel id (if one was provided as a prop)
     * @param prevPanelSize Previous panel size (will be undefined on mount)
     */
    onResize?: ((panelSize: PanelSize, id: string | number | undefined, prevPanelSize: PanelSize | undefined) => void) | undefined;
    /**
     * Exposes the following imperative API:
     * - `collapse(): void`
     * - `expand(): void`
     * - `getSize(): PanelSize`
     * - `isCollapsed(): boolean`
     * - `resize(size: number | string): void`
     *
     * ℹ️ The `usePanelRef` and `usePanelCallbackRef` hooks are exported for convenience in TypeScript projects.
     */
    panelRef?: Ref<PanelImperativeHandle | null> | undefined;
    /**
     * CSS properties.
     *
     * ⚠️ The default inline styles cannot be overridden, except for [`overflow`](https://react-resizable-panels.vercel.app/examples/overflow).
     */
    style?: CSSProperties | undefined;
};

export declare type PanelSize = {
    asPercentage: number;
    inPixels: number;
};

/**
 * The nearest ancestor Grid (returned by `useParentGrid`), including its imperative API.
 */
export declare type ParentGrid = GridImperativeHandle & {
    /**
     * Id of the Grid.
     */
    id: string;
};

/**
 * The nearest ancestor Group (returned by `useParentGroup`), including its imperative API.
 */
export declare type ParentGroup = GroupImperativeHandle & {
    /**
     * Id of the Group.
     */
    id: string;
    /**
     * Orientation of the Group.
     */
    orientation: Orientation;
};

/**
 * The nearest ancestor Panel (returned by `useParentPanel`), including its imperative API.
 */
export declare type ParentPanel = PanelImperativeHandle & {
    /**
     * Id of the Group that contains the Panel.
     */
    groupId: string;
    /**
     * Id of the Panel.
     */
    id: string;
};

/**
 * The nearest ancestor tab (returned by `useParentTab`).
 *
 * ℹ️ This value does not change for the life of the tab, so it is safe to use as an effect dependency.
 * Use `useParentTabState` for values that should trigger a re-render.
 */
export declare type ParentTab = {
    /**
     * Close the tab.
     *
     * ℹ️ This method is not restricted by `disableClose` or `disabled`.
     */
    close: () => void;
    /**
     * Move the tab into a new floating tabset (see `WorkspaceImperativeHandle.floatTab`).
     */
    float: (rect?: Partial<FloatingTabsetRect>) => void;
    /**
     * Id of the tabset that currently contains the tab.
     */
    getTabsetId: () => string;
    /**
     * Id of the tab.
     */
    id: string;
    /**
     * The tab is selected within its tabset.
     */
    isSelected: () => boolean;
    /**
     * Select the tab.
     */
    select: () => void;
    /**
     * Id of the Workspace that contains the tab.
     */
    workspaceId: string;
};

/**
 * The nearest ancestor tabset (returned by `useParentTabset`).
 *
 * ℹ️ This value does not change for the life of the tabset, so it is safe to use as an effect dependency.
 * Use `useParentTabsetState` for values that should trigger a re-render.
 */
export declare type ParentTabset<TabData = unknown> = {
    /**
     * Add a tab to this tabset.
     *
     * @return `true` if the tab was added (see `WorkspaceImperativeHandle.addTab`)
     */
    addTab: (tab: TabNode<TabData>, options?: {
        index?: number | undefined;
        select?: boolean | undefined;
    }) => boolean;
    /**
     * Close the tabset, along with any tabs it contains (see `WorkspaceImperativeHandle.closeTabset`).
     */
    close: () => void;
    /**
     * Collapse the tabset to just its header (see `WorkspaceImperativeHandle.collapseTabset`).
     */
    collapse: () => void;
    /**
     * Expand the tabset if it is collapsed (see `WorkspaceImperativeHandle.expandTabset`).
     */
    expand: () => void;
    /**
     * Move the tabset out of the layout, to float above it (see `WorkspaceImperativeHandle.floatTabset`).
     */
    float: (rect?: Partial<FloatingTabsetRect>) => void;
    /**
     * Id of the tabset.
     */
    id: string;
    /**
     * The tabset is currently collapsed (in the model).
     *
     * ℹ️ A tabset may be shown collapsed (or expanded) unlike the model: while a separator is being dragged (before the model changes),
     * and when it's collapsed to fit (see `TabsetNode.collapsible`); `useParentTabsetState().isCollapsed` reflects how it's shown.
     */
    isCollapsed: () => boolean;
    /**
     * The tabset currently floats above the layout (see `WorkspaceModel.floating`).
     */
    isFloating: () => boolean;
    /**
     * The tabset is currently maximized.
     */
    isMaximized: () => boolean;
    /**
     * Maximize the tabset.
     *
     * ℹ️ This has no effect on the only tabset in a workspace (see `ParentTabsetState.isRoot`).
     */
    maximize: () => void;
    /**
     * Restore the tabset if it is maximized.
     */
    restore: () => void;
    /**
     * Id of the Workspace that contains the tabset.
     */
    workspaceId: string;
};

/**
 * State of the nearest ancestor tabset (returned by `useParentTabsetState`).
 */
export declare type ParentTabsetState = {
    /**
     * The user most recently interacted with this tabset (by pointer or focus).
     */
    isActive: boolean;
    /**
     * The tabset is collapsed to just its header.
     *
     * ℹ️ While a separator is being dragged, this reflects how the tabset is shown (e.g. collapsed as soon as it reaches its collapsed size),
     * which the model (and `useParentTabset().isCollapsed()`) only reflects once the drag ends.
     *
     * ℹ️ A tabset that's collapsed to fit (see `isCollapsedToFit`) is collapsed, although the model has it expanded.
     *
     * ℹ️ A maximized tabset is shown expanded, but it's still collapsed when it is restored.
     */
    isCollapsed: boolean;
    /**
     * The tabset is collapsed only because it doesn't fit (e.g. the workspace is narrower than its tabsets' minimum sizes; see `TabsetNode.collapsible`).
     * The model has it expanded, and it's shown expanded again once it fits.
     *
     * ℹ️ It can't be expanded until then (e.g. `useParentTabset().expand()` does nothing), so a toolbar can hide (or disable) its "expand" button.
     */
    isCollapsedToFit: boolean;
    /**
     * The tabset can be collapsed (or is collapsed, and can be expanded), e.g. to show or hide a toolbar button:
     * it has the `collapsible` flag, isn't the only tabset in the workspace, and has a sibling that isn't collapsed (or it's floating; see `FloatingTabsetNode`).
     */
    isCollapsible: boolean;
    /**
     * The user cannot drag the tabset as a whole, because:
     * - It has the `disableDrag` flag, or one of its tabs does
     * - The Workspace has the `disabled` prop
     * - It's the only tabset in the workspace (see `isRoot`), and can't be dragged to another workspace (see the Workspace's `dragGroup` prop; tabsets with the `keepWhenEmpty` flag can't be)
     * - A tabset is maximized
     *
     * ℹ️ Dragging a floating tabset moves it (rather than dropping it elsewhere), so only its own `disableDrag` flag and the Workspace's `disabled` prop prevent that;
     * they also prevent it from being resized.
     */
    isDragDisabled: boolean;
    /**
     * The tabset floats above the layout (see `WorkspaceModel.floating`).
     */
    isFloating: boolean;
    /**
     * The tabset is maximized.
     */
    isMaximized: boolean;
    /**
     * The tabset is the root of the model, so it's the only tabset in the workspace.
     *
     * ℹ️ Some controls aren't useful for the only tabset (e.g. maximizing it), so this can be used to hide them.
     */
    isRoot: boolean;
    /**
     * Id of the selected tab.
     */
    selectedTabId: string | undefined;
};

/**
 * State of the nearest ancestor tab (returned by `useParentTabState`).
 */
export declare type ParentTabState = {
    /**
     * The user cannot close the tab (because of its `disableClose` flag or the Workspace's `disabled` prop).
     */
    isCloseDisabled: boolean;
    /**
     * The user cannot drag the tab (because of its `disableDrag` flag or the Workspace's `disabled` prop).
     */
    isDragDisabled: boolean;
    /**
     * The tab is selected within its tabset.
     *
     * ℹ️ This is true even if the tabset is covered by another, maximized tabset.
     */
    isSelected: boolean;
    /**
     * The tab is selected, and its tabset is neither collapsed nor covered by another, maximized tabset.
     *
     * ℹ️ While a separator is being dragged, this reflects how the tab's tabset is shown (e.g. collapsed as soon as it reaches its collapsed size),
     * which the model only reflects once the drag ends; it also reflects tabsets that are collapsed to fit (see `TabsetNode.collapsible`).
     *
     * ⚠️ This value does not account for the Workspace itself being hidden.
     */
    isVisible: boolean;
    /**
     * Id of the tabset that currently contains the tab.
     */
    tabsetId: string;
};

/**
 * The nearest ancestor Workspace (returned by `useParentWorkspace`), including its imperative API.
 */
export declare type ParentWorkspace<TabData = unknown, TabsetData = unknown> = WorkspaceImperativeHandle<TabData, TabsetData> & {
    /**
     * Id of the Workspace.
     */
    id: string;
};

declare type ResizePreviewMode = "panel" | "separator";

/**
 * Separators are not _required_ but they are _recommended_ as they improve keyboard accessibility.
 *
 * ⚠️ Separator elements must be direct DOM children of their parent Group elements.
 *
 * Separator elements always include the following attributes:
 *
 * ```html
 * <div data-separator data-testid="separator-id-prop" id="separator-id-prop" role="separator">
 * ```
 *
 * ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
 *
 * ℹ️ In addition to the attributes shown above, separator also renders all required [WAI-ARIA properties](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/separator_role#associated_wai-aria_roles_states_and_properties).
 */
export declare const Separator: typeof SeparatorComponent & {
    displayName: string;
};

declare function SeparatorComponent({ children, className, disabled, disableDoubleClick, elementRef, id: idProp, preview, style, ...rest }: SeparatorProps): JSX.Element;

/**
 * Customizes separator previews when resizePreviewMode is "separator".
 * Render within a `Group` to style all overlay previews, or pass to an individual `Separator` to style its overlay preview.
 *
 * Use `data-separator-overlay="active"` to style the separator being dragged,
 * or `data-separator-overlay="inactive"` for separators moved indirectly.
 *
 * Set `width` (horizontal groups) or `height` (vertical groups) using `style` or `className`.
 */
export declare const SeparatorOverlay: typeof SeparatorOverlayComponent & {
    displayName: string;
};

declare function SeparatorOverlayComponent(props: SeparatorOverlayProps): null;

export declare type SeparatorOverlayProps = HTMLAttributes<HTMLDivElement>;

export declare type SeparatorProps = BaseSeparatorAttributes & {
    /**
     * CSS class name.
     *
     * ℹ️ Use the `data-separator` attribute for custom _hover_ and _active_ styles
     *
     * ⚠️ The following properties cannot be overridden: `flex-grow`, `flex-shrink`
     */
    className?: string | undefined;
    /**
     * When disabled, the separator cannot be used to resize its neighboring panels.
     *
     * ℹ️ The panels may still be resized indirectly (while other panels are being resized).
     * To prevent a panel from being resized at all, it needs to also be disabled.
     */
    disabled?: boolean | undefined;
    /**
     * When true, double-clicking this `Separator` will not reset its `Panel` to its default size.
     */
    disableDoubleClick?: boolean;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement> | undefined;
    /**
     * Uniquely identifies the separator within the parent group.
     * Falls back to `useId` when not provided.
     *
     * ℹ️ This value will also be assigned to the `id` and `data-testid` attributes (an explicit `data-testid` prop will take precedence).
     */
    id?: string | number | undefined;
    /**
     * Overrides the `Group` default preview for this `Separator` when `resizePreviewMode` is "separator".
     */
    preview?: ReactNode;
    /**
     * CSS properties.
     *
     * ℹ️ Use the `data-separator` attribute for custom _hover_ and _active_ styles
     *
     * ⚠️ The following properties cannot be overridden: `flex-grow`, `flex-shrink`
     */
    style?: CSSProperties | undefined;
};

export declare type SizeUnit = "px" | "%" | "em" | "rem" | "vh" | "vw";

/**
 * Lays out its children side by side (horizontally) or stacked (vertically), with resizable separators between them.
 */
export declare type SplitNode<TabData = unknown, TabsetData = unknown> = {
    /**
     * Distinguishes splits from tabsets.
     */
    type: "split";
    /**
     * Uniquely identifies the split within the workspace.
     *
     * ℹ️ Optional in the `defaultModel` prop and the `setModel` method; splits without ids are assigned ids based on their position (e.g. "split-root").
     */
    id: string;
    /**
     * Children are laid out side by side ("horizontal") or stacked ("vertical").
     */
    orientation: Orientation;
    /**
     * Size of the split within its parent split.
     *
     * ℹ️ Interpretation rules:
     * - Numbers are percentages of the parent split (e.g. `size: 25` is 25 percent)
     * - Strings may specify other units (e.g. `size: "250px"`); strings without units are percentages
     * - Siblings without a size share the remaining space evenly
     *
     * ⚠️ String sizes are only initial sizes: they're converted to percentages when the user resizes the split,
     * and (like percentages) they scale with the workspace when it's resized.
     */
    size?: number | string | undefined;
    /**
     * Tabsets and nested splits, in the order they are shown.
     */
    children: WorkspaceNode<TabData, TabsetData>[];
};

export declare type SplitNodeInput<TabData = unknown, TabsetData = unknown> = Omit<SplitNode<TabData, TabsetData>, "children" | "id"> & {
    children: WorkspaceNodeInput<TabData, TabsetData>[];
    id?: string | undefined;
};

declare type StatefulButtonProps<State> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof StatefulProps<State>> & StatefulProps<State>;

/**
 * Props of the Workspace's buttons and handles (see `TabCloseButton`) whose values can depend on the component's state.
 */
export declare type StatefulProps<State> = {
    /**
     * Content of the element, or a function that returns it (given the component's state).
     */
    children?: ValueOrFunction<ReactNode, State>;
    /**
     * Class name of the element, or a function that returns it (given the component's state).
     */
    className?: ValueOrFunction<string | undefined, State>;
    /**
     * Inline styles of the element, or a function that returns them (given the component's state).
     */
    style?: ValueOrFunction<CSSProperties | undefined, State>;
    /**
     * Tooltip of the element, or a function that returns it (given the component's state).
     */
    title?: ValueOrFunction<string | undefined, State>;
};

/**
 * Closes the tab it is rendered within; render it within the element returned by the Workspace's `renderTab` prop:
 *
 * ```tsx
 * renderTab={(tab, props) => (
 *   <div {...props}>
 *     {tab.title}
 *     <TabCloseButton>×</TabCloseButton>
 *   </div>
 * )}
 * ```
 *
 * The button renders nothing if closing is disabled (by the tab's `disableClose` flag or the Workspace's `disabled` prop).
 * Its content defaults to "×" (e.g. it can be replaced with an icon),
 * and its default `aria-label` is "Close" followed by the tab's title (or id).
 *
 * Its `children`, `className`, `style`, and `title` can also be functions of its state (see `TabCloseButtonState`):
 *
 * ```tsx
 * <TabCloseButton title={({ tabTitle }) => `Close ${tabTitle}`} />
 * ```
 *
 * To keep the tab open (e.g. to confirm unsaved changes first), call `event.preventDefault()` in an `onClick` handler:
 *
 * ```tsx
 * <TabCloseButton
 *   onClick={(event) => {
 *     if (hasUnsavedChanges && !confirm("Discard unsaved changes?")) {
 *       event.preventDefault();
 *     }
 *   }}
 * />
 * ```
 *
 * ℹ️ This button is not focusable by default (`tabIndex={-1}`), since tabs shouldn't contain focusable content;
 * keyboard users can close the focused tab with Delete or Backspace.
 */
export declare const TabCloseButton: typeof TabCloseButtonComponent & {
    displayName: string;
};

declare function TabCloseButtonComponent({ "aria-label": ariaLabel, children, className, onClick, style, title, ...rest }: TabCloseButtonProps): JSX.Element | null;

export declare type TabCloseButtonProps = StatefulButtonProps<TabCloseButtonState>;

/**
 * State of a `TabCloseButton`, passed to its function props (see `StatefulProps`).
 */
export declare type TabCloseButtonState = {
    /**
     * The title of the tab the button closes (or its id, if it doesn't have one).
     */
    tabTitle: string;
};

/**
 * Edge (or center) of a tabset's content area.
 *
 * ℹ️ Edges are sides of the screen, so in a right-to-left layout (e.g. within `dir="rtl"`), "left" is after the tabset in its split's `children`.
 */
export declare type TabDropRegion = "bottom" | "center" | "left" | "right" | "top";

/**
 * Where a dragged tab can be dropped:
 * - At an `index` within a tabset's tab list (in the order of its `tabs`, which run from right to left in a right-to-left layout)
 * - Within a `region` of a tabset's content area; edges split the tabset, and the center adds the tab to it
 * - At an `edge` of the workspace, beside all of the other tabsets (filling the workspace's height or width)
 */
export declare type TabDropTarget = {
    index: number;
    tabsetId: string;
} | {
    region: TabDropRegion;
    tabsetId: string;
} | {
    edge: WorkspaceDropEdge;
};

/**
 * A tab within a tabset.
 */
export declare type TabNode<TabData = unknown> = {
    /**
     * Uniquely identifies the tab within the workspace.
     *
     * ℹ️ Tab ids are chosen by the application, since they usually identify something real (e.g. a file path).
     */
    id: string;
    /**
     * Label used wherever the workspace generates text for the tab:
     * the default tab rendering, the default drag preview, and the `TabCloseButton` label.
     * Falls back to the tab's `id`.
     */
    title?: string | undefined;
    /**
     * Application data for the tab.
     *
     * ℹ️ This value should be serializable (e.g. JSON) if the workspace model will be saved.
     */
    data: TabData;
    /**
     * The user cannot close this tab.
     *
     * ℹ️ The tab can still be closed using the imperative API.
     */
    disableClose?: boolean | undefined;
    /**
     * The user cannot drag this tab.
     *
     * ℹ️ The tab can still be selected, and other tabs can still be dropped around it.
     */
    disableDrag?: boolean | undefined;
};

/**
 * Which tab is selected when a tabset's selected tab is removed (closed, or dragged to another tabset):
 * - `"adjacent"`: the tab after it (or before it, if it was the last tab)
 * - `"recent"`: the tabset's most recently selected tab (falling back to `"adjacent"` if none of its other tabs has been selected)
 */
export declare type TabRemovalSelectionBehavior = "adjacent" | "recent";

/**
 * Props passed to the Workspace's `renderTab` prop, to be spread onto the element it returns.
 */
export declare type TabRenderProps = Pick<HTMLAttributes<HTMLElement>, "aria-controls" | "aria-selected" | "className" | "id" | "onClick" | "onKeyDown" | "onPointerDown" | "role" | "style" | "tabIndex"> & {
    ref: RefCallback<HTMLElement>;
    [dataAttribute: `data-${string}`]: string | boolean | undefined;
};

/**
 * Collapses (or expands) the tabset it is rendered within; render it within the content returned by the Workspace's `renderTabsetToolbar` prop.
 * Its `children`, `className`, `style`, and `title` can be functions of its state (see `TabsetCollapseButtonState`), e.g. to show a different icon while the tabset is collapsed:
 *
 * ```tsx
 * renderTabsetToolbar={() => (
 *   <TabsetCollapseButton title={({ isCollapsed }) => (isCollapsed ? "Expand" : "Collapse")}>
 *     {({ isCollapsed }) => (isCollapsed ? "▸" : "▾")}
 *   </TabsetCollapseButton>
 * )}
 * ```
 *
 * The button renders nothing if the tabset can't be collapsed (see `ParentTabsetState.isCollapsible`), or while it's maximized.
 * While the tabset is collapsed only because it doesn't fit (see `ParentTabsetState.isCollapsedToFit`), it can't be expanded, so the button has `aria-disabled="true"`.
 *
 * Its `aria-expanded` attribute reflects whether the tabset is expanded, and its `aria-controls` attribute refers to the selected tab's panel;
 * its default `aria-label` ("Collapse tabset") doesn't change, since `aria-expanded` describes the state.
 *
 * To keep the tabset as it is, call `event.preventDefault()` in an `onClick` handler.
 *
 * ℹ️ Clicking a tab of a collapsed tabset also expands it.
 */
export declare const TabsetCollapseButton: typeof TabsetCollapseButtonComponent & {
    displayName: string;
};

declare function TabsetCollapseButtonComponent({ "aria-label": ariaLabel, children, className, onClick, style, title, ...rest }: TabsetCollapseButtonProps): JSX.Element | null;

export declare type TabsetCollapseButtonProps = StatefulButtonProps<TabsetCollapseButtonState>;

/**
 * State of a `TabsetCollapseButton`, passed to its function props (see `StatefulProps`).
 */
export declare type TabsetCollapseButtonState = {
    /**
     * The tabset is collapsed to just its header (see `ParentTabsetState.isCollapsed`).
     */
    isCollapsed: boolean;
    /**
     * The tabset is collapsed only because it doesn't fit, so it can't be expanded until it does (see `ParentTabsetState.isCollapsedToFit`);
     * the button is disabled (with `aria-disabled`) until then.
     */
    isCollapsedToFit: boolean;
};

/**
 * Drags the tabset it is rendered within; render it within the content returned by the Workspace's `renderTabsetToolbar` prop:
 *
 * ```tsx
 * renderTabsetToolbar={() => (
 *   <TabsetDragHandle>⠿</TabsetDragHandle>
 * )}
 * ```
 *
 * By default, a tabset is dragged by the empty space in its header;
 * once its header contains a drag handle, only the handle drags it.
 * Any element with a `data-tabset-drag-handle` attribute is a drag handle;
 * this component also sets `touch-action: none`, so that it can be dragged by touch.
 *
 * The handle has a `data-disabled` attribute when the tabset can't be dragged (see `useParentTabsetState`), e.g. to hide it.
 * Its `children`, `className`, `style`, and `title` can also be functions of its state (see `TabsetDragHandleState`):
 *
 * ```tsx
 * <TabsetDragHandle title={({ isDisabled }) => (isDisabled ? undefined : "Drag tabset")}>
 *   ⠿
 * </TabsetDragHandle>
 * ```
 */
export declare const TabsetDragHandle: typeof TabsetDragHandleComponent & {
    displayName: string;
};

declare function TabsetDragHandleComponent({ children, className, style, title, ...rest }: TabsetDragHandleProps): JSX.Element;

export declare type TabsetDragHandleProps = Omit<HTMLAttributes<HTMLDivElement>, keyof StatefulProps<TabsetDragHandleState>> & StatefulProps<TabsetDragHandleState>;

/**
 * State of a `TabsetDragHandle`, passed to its function props (see `StatefulProps`).
 */
export declare type TabsetDragHandleState = {
    /**
     * The tabset can't be dragged (see `ParentTabsetState.isDragDisabled`).
     */
    isDisabled: boolean;
};

/**
 * Maximizes (or restores) the tabset it is rendered within; render it within the content returned by the Workspace's `renderTabsetToolbar` prop.
 * Its `children`, `className`, `style`, and `title` can be functions of its state (see `TabsetMaximizeButtonState`), e.g. to show a different icon while the tabset is maximized:
 *
 * ```tsx
 * renderTabsetToolbar={() => (
 *   <TabsetMaximizeButton title={({ isMaximized }) => (isMaximized ? "Restore" : "Maximize")}>
 *     {({ isMaximized }) => (isMaximized ? "Restore" : "Maximize")}
 *   </TabsetMaximizeButton>
 * )}
 * ```
 *
 * The button renders nothing for the only tabset in a workspace (see `ParentTabsetState.isRoot`) and for floating tabsets, which can't be maximized.
 *
 * Its `aria-pressed` attribute reflects whether the tabset is maximized;
 * its default `aria-label` ("Maximize tabset") doesn't change, since `aria-pressed` describes the state.
 *
 * To keep the tabset as it is, call `event.preventDefault()` in an `onClick` handler.
 */
export declare const TabsetMaximizeButton: typeof TabsetMaximizeButtonComponent & {
    displayName: string;
};

declare function TabsetMaximizeButtonComponent({ "aria-label": ariaLabel, children, className, onClick, style, title, ...rest }: TabsetMaximizeButtonProps): JSX.Element | null;

export declare type TabsetMaximizeButtonProps = StatefulButtonProps<TabsetMaximizeButtonState>;

/**
 * State of a `TabsetMaximizeButton`, passed to its function props (see `StatefulProps`).
 */
export declare type TabsetMaximizeButtonState = {
    /**
     * The tabset is maximized (see `ParentTabsetState.isMaximized`).
     */
    isMaximized: boolean;
};

/**
 * A set of tabs, only one of which is shown at a time.
 */
export declare type TabsetNode<TabData = unknown, TabsetData = unknown> = {
    /**
     * Distinguishes tabsets from splits.
     */
    type: "tabset";
    /**
     * Uniquely identifies the tabset within the workspace.
     *
     * ℹ️ Optional in the `defaultModel` prop and the `setModel` method; tabsets without ids are assigned ids based on their position (e.g. "tabset-0-1").
     * Tabsets created by the workspace (e.g. by dropping a tab onto the edge of another tabset) are assigned generated ids.
     */
    id: string;
    /**
     * Size of the tabset within its parent split.
     *
     * ℹ️ Interpretation rules:
     * - Numbers are percentages of the parent split (e.g. `size: 25` is 25 percent)
     * - Strings may specify other units (e.g. `size: "250px"`); strings without units are percentages
     * - Siblings without a size share the remaining space evenly
     *
     * ⚠️ String sizes are only initial sizes: they're converted to percentages when the user resizes the split,
     * and (like percentages) they scale with the workspace when it's resized.
     *
     * ℹ️ A tabset is shown within its minimum and maximum sizes (see `minWidth` and `maxWidth`), even if its size is outside of them
     * (e.g. a model saved in a wider window); its size isn't changed, so it's shown at its size again once that fits.
     */
    size?: number | string | undefined;
    /**
     * Minimum width of the tabset's content area (not including its header).
     * Overrides the Workspace's `tabsetMinWidth` prop.
     *
     * ℹ️ Interpretation rules:
     * - Strings must specify a unit: "px", "em", "rem", "vh", or "vw" (e.g. `minWidth: "200px"`)
     * - Percentages (and strings without units) are not allowed
     */
    minWidth?: string | undefined;
    /**
     * Minimum height of the tabset's content area (not including its header).
     * Overrides the Workspace's `tabsetMinHeight` prop.
     *
     * ℹ️ Interpretation rules:
     * - Strings must specify a unit: "px", "em", "rem", "vh", or "vw" (e.g. `minHeight: "200px"`)
     * - Percentages (and strings without units) are not allowed
     */
    minHeight?: string | undefined;
    /**
     * Maximum width of the tabset's content area (not including its header).
     *
     * ℹ️ Interpretation rules:
     * - Strings must specify a unit: "px", "em", "rem", "vh", or "vw" (e.g. `maxWidth: "400px"`)
     * - Percentages (and strings without units) are not allowed
     * - If the tabset's minimum width is larger, the minimum is used
     *
     * ⚠️ A maximum only applies if something else can take up the rest of the space, e.g. another tabset in the same split without a maximum width;
     * otherwise it's ignored (e.g. if every tabset in a split has a maximum, or the tabset fills the workspace).
     *
     * ℹ️ Maximums don't apply to floating tabsets, which can be resized to any size larger than their minimums.
     */
    maxWidth?: string | undefined;
    /**
     * Maximum height of the tabset's content area (not including its header).
     *
     * ℹ️ Interpretation rules:
     * - Strings must specify a unit: "px", "em", "rem", "vh", or "vw" (e.g. `maxHeight: "400px"`)
     * - Percentages (and strings without units) are not allowed
     * - If the tabset's minimum height is larger, the minimum is used
     *
     * ⚠️ A maximum only applies if something else can take up the rest of the space, e.g. another tabset in the same split without a maximum height;
     * otherwise it's ignored (e.g. if every tabset in a split has a maximum, or the tabset fills the workspace).
     *
     * ℹ️ Maximums don't apply to floating tabsets, which can be resized to any size larger than their minimums.
     */
    maxHeight?: string | undefined;
    /**
     * Where the tabset's tabs are placed relative to its content.
     * Overrides the Workspace's `tabPlacement` prop.
     *
     * ℹ️ See the Workspace's `tabPlacement` prop for how placement affects tabsets.
     *
     * ℹ️ Tabsets created by the workspace (e.g. by dropping a tab onto the edge of another tabset) use the Workspace's `tabPlacement` prop.
     */
    tabPlacement?: "bottom" | "left" | "right" | "top" | undefined;
    /**
     * The tabset isn't removed when its last tab is closed or dragged away;
     * it stays (showing the Workspace's `renderEmptyTabset` content) until it is closed (see `closeTabset`).
     *
     * ℹ️ By default, tabsets without tabs are removed (other than the root tabset of an empty workspace).
     *
     * ℹ️ Tabsets created by the workspace (e.g. by dropping a tab onto the edge of another tabset) don't keep this flag.
     */
    keepWhenEmpty?: boolean | undefined;
    /**
     * The tabset can be collapsed to just its header (its tab list and toolbar), e.g. a bottom panel or a sidebar.
     *
     * ℹ️ Tabsets are collapsed by dragging a separator past their minimum size (like collapsible Panels),
     * or with the imperative API (e.g. a button rendered by `renderTabsetToolbar`, see `useParentTabset`);
     * clicking a tab (or the empty space in the header) of a collapsed tabset expands it, as does dropping tabs into it from another tabset.
     *
     * ℹ️ The only tabset in a workspace (the root) can't be collapsed, and neither can a tabset whose siblings are all collapsed.
     *
     * ℹ️ When tabsets don't fit (e.g. the workspace is made narrower than their minimum sizes), a collapsible tabset may be collapsed to fit.
     * It's shown collapsed (see `useParentTabsetState().isCollapsedToFit`), but the model isn't changed, so it's shown expanded again once it fits.
     * Until then, it can't be expanded: clicking one of its tabs selects the tab, and `expandTabset` does nothing.
     * A resize of its split doesn't change it either (it stays expanded in the model, with its size), unless the resize expands it.
     *
     * ℹ️ Tabsets created by the workspace (e.g. by dropping a tab onto the edge of another tabset) don't keep this flag.
     */
    collapsible?: boolean | undefined;
    /**
     * The tabset is collapsed to just its header.
     *
     * ℹ️ A collapsed tabset's `size` is the size it expands to; its siblings share the rest of the split.
     *
     * ℹ️ A collapsed tabset's header runs along its split (e.g. tabs placed on top are shown on the left while a tabset in a horizontal split is collapsed);
     * this doesn't change its `tabPlacement`.
     *
     * ℹ️ A floating tabset can be collapsed too (without the `collapsible` flag, which doesn't apply to it; see `FloatingTabsetNode`).
     */
    collapsed?: boolean | undefined;
    /**
     * The user cannot drag the tabset as a whole (by the empty space in its header, or by a `TabsetDragHandle`).
     *
     * ℹ️ Its tabs can still be dragged individually (unless they have their own `disableDrag` flags),
     * and the tabset can still be moved using the imperative API.
     */
    disableDrag?: boolean | undefined;
    /**
     * Id of the selected tab.
     */
    selectedId?: string | undefined;
    /**
     * Ids of the tabset's tabs that have been selected, most recently selected first;
     * used to choose which tab to select when the selected tab is removed (see the Workspace's `tabRemovalSelectionBehavior` prop).
     *
     * ℹ️ This field is maintained by the workspace, and only when `tabRemovalSelectionBehavior` is `"recent"`.
     */
    recentTabIds?: string[] | undefined;
    /**
     * Application data for the tabset.
     *
     * ℹ️ Tabsets created by the workspace start without data.
     */
    data?: TabsetData | undefined;
    /**
     * Tabs in the tabset, in the order they are shown.
     */
    tabs: TabNode<TabData>[];
};

export declare type TabsetNodeInput<TabData = unknown, TabsetData = unknown> = Omit<TabsetNode<TabData, TabsetData>, "id"> & {
    id?: string | undefined;
};

/**
 * Arguments passed to the Workspace's `onTearOff` prop: the tab (or whole tabset) dropped outside of the window,
 * and a model for showing it in a new workspace (e.g. in a popup window).
 */
export declare type TearOffArgs<TabData = unknown, TabsetData = unknown> = ({
    /**
     * The tab dropped outside of the window.
     */
    tab: TabNode<TabData>;
    type: "tab";
} | {
    /**
     * The tabset dropped outside of the window.
     */
    tabset: TabsetNode<TabData, TabsetData>;
    type: "tabset";
}) & {
    /**
     * Height (in pixels) of the tabset the tab was dragged from (or of the dragged tabset), e.g. to size a popup window.
     */
    height: number;
    /**
     * A model containing only the torn off tab (in a new tabset) or tabset, e.g. the `defaultModel` of a workspace in a popup window.
     */
    model: WorkspaceModel<TabData, TabsetData>;
    /**
     * Horizontal position (in screen coordinates) where the pointer was released, e.g. to position a popup window.
     *
     * ℹ️ Approximate when dragging between workspaces (see the `dragGroup` prop), since some browsers report the wrong position when such drags end.
     */
    screenX: number;
    /**
     * Vertical position (in screen coordinates) where the pointer was released, e.g. to position a popup window.
     */
    screenY: number;
    /**
     * Width (in pixels) of the tabset the tab was dragged from (or of the dragged tabset), e.g. to size a popup window.
     */
    width: number;
};

/**
 * Saves and restores Grid layouts between page loads.
 * It can be configured to store values using `localStorage`, `sessionStorage`, cookies, or any other persistence layer that makes sense for your application.
 */
export declare function useDefaultGridLayout({ id, onlySaveAfterUserInteractions, storage }: {
    /**
     * Uniquely identifies a specific grid/layout.
     */
    id: string;
    /**
     * Only auto-save layouts that were directly caused by user input (e.g. keyboard or mouse events).
     * Ignore layout changes resulting from imperative API calls or window resize events.
     */
    onlySaveAfterUserInteractions?: boolean;
    /**
     * Storage implementation; supports localStorage, sessionStorage, and custom implementations
     * Refer to documentation site for example integrations.
     */
    storage?: LayoutStorage;
}): {
    /**
     * Pass this value to `Grid` as the `defaultLayout` prop.
     */
    defaultLayout: Partial<GridLayout> | undefined;
    /**
     * Attach this callback on the `Grid` as the `onLayoutChanged` prop.
     */
    onLayoutChanged: (layout: GridLayout, meta: LayoutChangedMeta<GridLayout>) => void;
};

/**
 * Saves and restores group layouts between page loads.
 * It can be configured to store values using `localStorage`, `sessionStorage`, cookies, or any other persistence layer that makes sense for your application.
 */
export declare function useDefaultLayout({ debounceSaveMs, onlySaveAfterUserInteractions, panelIds, storage, ...rest }: {
    /**
     * Debounce save operation by the specified number of milliseconds; defaults to 100ms
     *
     * @deprecated Use the {@link onLayoutChanged} callback instead; it does not require debouncing
     */
    debounceSaveMs?: number;
    /**
     * Only auto-save layouts that were directly caused by user input (e.g. keyboard or mouse events).
     * Ignore layout changes resulting from imperative API calls or window resize events.
     */
    onlySaveAfterUserInteractions?: boolean;
    /**
     * For Groups that contain conditionally-rendered Panels, this prop can be used to save and restore multiple layouts.
     *
     * ℹ️ This prevents layout shift for server-rendered apps.
     *
     * ⚠️ Panel ids must match the Panels rendered within the Group during mount or the initial layout will be incorrect.
     */
    panelIds?: string[] | undefined;
    /**
     * Storage implementation; supports localStorage, sessionStorage, and custom implementations
     * Refer to documentation site for example integrations.
     *
     */
    storage?: LayoutStorage;
} & ({
    /**
     * Group id; must be unique in order for layouts to be saved separately.
     * @deprecated Use the {@link id} param instead
     */
    groupId: string;
} | {
    /**
     * Uniquely identifies a specific group/layout.
     */
    id: string;
})): {
    /**
     * Pass this value to `Group` as the `defaultLayout` prop.
     */
    defaultLayout: Layout | undefined;
    /**
     * Attach this callback on the `Group` as the `onLayoutChange` prop.
     *
     * @deprecated Use the {@link onLayoutChanged} prop instead.
     */
    onLayoutChange: (layout: Layout) => void | undefined;
    /**
     * Attach this callback on the `Group` as the `onLayoutChanged` prop.
     */
    onLayoutChanged: (layout: Layout, meta: LayoutChangedMeta) => void;
};

/**
 * Convenience hook to return a properly typed ref callback for the Grid component.
 *
 * Use this hook when you need to share the ref with another component or hook.
 */
export declare function useGridCallbackRef(): [GridImperativeHandle | null, Dispatch<SetStateAction<GridImperativeHandle | null>>];

/**
 * Convenience hook to return a properly typed ref for the Grid component.
 */
export declare function useGridRef(): RefObject<GridImperativeHandle | null>;

/**
 * Convenience hook to return a properly typed ref callback for the Group component.
 *
 * Use this hook when you need to share the ref with another component or hook.
 */
export declare function useGroupCallbackRef(): [GroupImperativeHandle | null, Dispatch<SetStateAction<GroupImperativeHandle | null>>];

/**
 * Convenience hook to return a properly typed ref for the Group component.
 */
export declare function useGroupRef(): RefObject<GroupImperativeHandle | null>;

/**
 * Convenience hook to return a properly typed ref callback for the Panel component.
 *
 * Use this hook when you need to share the ref with another component or hook.
 */
export declare function usePanelCallbackRef(): [PanelImperativeHandle | null, Dispatch<SetStateAction<PanelImperativeHandle | null>>];

/**
 * Convenience hook to return a properly typed ref for the Panel component.
 */
export declare function usePanelRef(): RefObject<PanelImperativeHandle | null>;

/**
 * Returns the nearest ancestor Grid (or null if the component is not rendered within a Grid).
 *
 * ℹ️ The returned value includes the Grid's imperative API; it does not change when the Grid's layout changes.
 */
export declare function useParentGrid(): ParentGrid | null;

/**
 * Returns the nearest ancestor Group (or null if the component is not rendered within a Group).
 *
 * ℹ️ The returned value includes the Group's imperative API; it does not change when the Group's layout changes.
 */
export declare function useParentGroup(): ParentGroup | null;

/**
 * Returns the nearest ancestor Panel (or null if the component is not rendered within a Panel).
 *
 * ℹ️ The returned value includes the Panel's imperative API; it does not change when the Panel is resized.
 */
export declare function useParentPanel(): ParentPanel | null;

/**
 * Returns the nearest ancestor tab (or null if the component is not rendered within a tab (see `renderTab`) or the content of a tab).
 *
 * ℹ️ The returned value does not change for the life of the tab, so it is safe to use as an effect dependency.
 * Use `useParentTabState` for values that should trigger a re-render.
 */
export declare function useParentTab(): ParentTab | null;

/**
 * Returns the nearest ancestor tabset (or null if the component is not rendered within a tabset or the content of a tab).
 *
 * ℹ️ The returned value does not change for the life of the tabset, so it is safe to use as an effect dependency.
 * Use `useParentTabsetState` for values that should trigger a re-render.
 */
export declare function useParentTabset<TabData = unknown>(): ParentTabset<TabData> | null;

/**
 * Returns the state of the nearest ancestor tabset (or null if the component is not rendered within a tabset or the content of a tab).
 *
 * ℹ️ Components that use this hook only re-render when the tabset's state changes.
 */
export declare function useParentTabsetState(): ParentTabsetState | null;

/**
 * Returns the state of the nearest ancestor tab (or null if the component is not rendered within a tab (see `renderTab`) or the content of a tab).
 *
 * ℹ️ Components that use this hook only re-render when the tab's state changes.
 */
export declare function useParentTabState(): ParentTabState | null;

/**
 * Returns the nearest ancestor Workspace (or null if the component is not rendered within a Workspace).
 *
 * ℹ️ The returned value includes the Workspace's imperative API; it does not change when the Workspace's model changes.
 */
export declare function useParentWorkspace<TabData = unknown, TabsetData = unknown>(): ParentWorkspace<TabData, TabsetData> | null;

/**
 * Returns the space (in pixels) in the nearest ancestor tabset's tab list that its tabs don't use (negative once they overflow),
 * e.g. for a toolbar (see `renderTabsetToolbar`) that moves items into an overflow menu when the tabset's header runs out of room;
 * see `WorkspaceImperativeHandle.getTabListFreeSpace`.
 *
 * ℹ️ The component re-renders when the free space changes, before the browser paints.
 *
 * @returns The free space, or `undefined` if the component is not rendered within a tabset (or the tab list hasn't been measured yet, e.g. while server rendering, or right after the tabset is first rendered)
 */
export declare function useTabListFreeSpace(): number | undefined;

/**
 * Convenience hook to return a properly typed ref callback for the Workspace component.
 *
 * Use this hook when you need to share the ref with another component or hook.
 */
export declare function useWorkspaceCallbackRef<TabData = unknown, TabsetData = unknown>(): [WorkspaceImperativeHandle<TabData, TabsetData> | null, Dispatch<SetStateAction<WorkspaceImperativeHandle<TabData, TabsetData> | null>>];

/**
 * Convenience hook to return a properly typed ref for the Workspace component.
 */
export declare function useWorkspaceRef<TabData = unknown, TabsetData = unknown>(): RefObject<WorkspaceImperativeHandle<TabData, TabsetData> | null>;

/**
 * A prop that's either a value or a function that returns one, given the state of the component (e.g. whether a tabset is collapsed).
 */
export declare type ValueOrFunction<Value, State> = Value | ((state: State) => Value);

/**
 * A Workspace arranges tabsets that users can rearrange by dragging tabs:
 * between tabsets, within a tabset's list of tabs, or onto the edge of a tabset to split it.
 * Tabsets can be resized and maximized.
 *
 * The layout is described by a serializable model (see `WorkspaceModel`).
 * Workspaces are uncontrolled: provide an initial model with the `defaultModel` prop, save changes from the `onModelChanged` callback,
 * and make changes using the imperative API (see `WorkspaceImperativeHandle`).
 *
 * ℹ️ Tab content is not remounted when a tab is moved.
 * Its elements are moved within the document, though, which resets some browser state (e.g. iframes are reloaded).
 *
 * Workspace elements always include the following attributes:
 *
 * ```html
 * <div data-workspace data-testid="workspace-id-prop" id="workspace-id-prop">
 * ```
 *
 * ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
 */
export declare const Workspace: typeof WorkspaceComponent & {
    displayName: string;
};

/**
 * Metadata describing a model change, passed as the second argument to the `onModelChanged` callback.
 */
export declare type WorkspaceChangedMeta = {
    /**
     * `true` when the change was caused by the user (e.g. dragging a tab or clicking a close button),
     * `false` for imperative API calls.
     */
    isUserInteraction: boolean;
    /**
     * Which change was made.
     *
     * ℹ️ A resize that collapses or expands tabsets is reported as `"collapse"` or `"expand"` (as `"expand"` if it does both);
     * dropping tabs into a collapsed tabset expands it, but is reported as `"move"`.
     *
     * ℹ️ A tab (or tabset) dragged to another workspace (see the `dragGroup` prop) is reported as `"transfer"` by both workspaces:
     * the one it was dropped into (which added it) and the one it was dragged from (which removed it).
     *
     * ℹ️ Floating tabsets (see `WorkspaceModel.floating`) are reported as `"float"` when they're created, `"move"` and `"resize"` when they're dragged by their headers and edges,
     * and `"raise"` when they're brought to the front (e.g. by pressing one that's behind another).
     *
     * ⚠️ New reasons may be added in later versions, so code that switches on this value should handle unrecognized values.
     */
    reason: WorkspaceChangeReason;
};

/**
 * Which change caused `onModelChanged` to be called.
 *
 * ⚠️ New reasons may be added in later versions.
 */
export declare type WorkspaceChangeReason = "add" | "close" | "collapse" | "expand" | "float" | "maximize" | "move" | "raise" | "resize" | "restore" | "select" | "set-model" | "tear-off" | "transfer" | "update";

/**
 * CSS class names for the elements a Workspace renders (see the Workspace's `classNames` prop).
 */
export declare type WorkspaceClassNames = {
    dragPreview?: string | undefined;
    dropIndicator?: string | undefined;
    /**
     * The element that positions each floating tabset (with a `data-floating-tabset` attribute, and a `data-tabset-collapsed` attribute while its tabset is collapsed), around the tabset itself, e.g. for a shadow.
     */
    floatingTabset?: string | undefined;
    /**
     * Each of the handles along the edges (and at the corners) of a floating tabset that resize it,
     * with a `data-floating-resize-handle` attribute naming its edge (e.g. "bottom" or "bottom-right").
     *
     * ℹ️ The handles are positioned (and given resize cursors) by the workspace, but they're transparent.
     */
    floatingResizeHandle?: string | undefined;
    header?: string | undefined;
    /**
     * Each split (a Group with `data-split` and `data-split-id` attributes); for example, its `gap` adds space between tabsets.
     *
     * ℹ️ Gaps count toward the split's minimum size, like its separators.
     */
    split?: string | undefined;
    tab?: string | undefined;
    tabContent?: string | undefined;
    tabList?: string | undefined;
    tabPanels?: string | undefined;
    tabset?: string | undefined;
    toolbar?: string | undefined;
};

declare function WorkspaceComponent<TabData = unknown, TabsetData = unknown>({ className, classNames, defaultModel, disabled, disableDragBetweenApps, disableDrop, dragGroup, elementRef: elementRefProp, hiddenTabBehavior, id: idProp, onModelChanged, onTearOff, renderDragPreview, renderEmptyTabset, renderSeparator, renderTab, renderTabContent, renderTabsetDragPreview, renderTabsetToolbar, resizePreviewMode, serverRenderTabContent, style, styles, tabPlacement, tabRemovalSelectionBehavior, tabsetMinHeight, tabsetMinWidth, workspaceRef, ...rest }: WorkspaceProps<TabData, TabsetData>): JSX.Element;

/**
 * Edge of the workspace.
 *
 * ℹ️ Edges are sides of the screen, so in a right-to-left layout (e.g. within `dir="rtl"`), "left" is at the end of the root split's `children`.
 */
export declare type WorkspaceDropEdge = "bottom" | "left" | "right" | "top";

/**
 * Imperative Workspace API.
 *
 * The easiest way to interact with this API is to use the `useWorkspaceRef` and `useWorkspaceCallbackRef` hooks.
 *
 * ℹ️ These methods are not restricted by `disabled`, `disableClose`, `disableDrag`, or `disableDrop`.
 */
export declare interface WorkspaceImperativeHandle<TabData = unknown, TabsetData = unknown> {
    /**
     * Add a tab to a tabset.
     *
     * ℹ️ If a tab with the same id already exists, it is selected instead (and its data is not changed).
     *
     * @param tab Tab to add
     * @param options.tabsetId Tabset to add the tab to; defaults to the active tabset
     * @param options.index Position within the tabset; defaults to the end
     * @param options.select Select the new tab; defaults to true
     * @return `true` if the tab was added
     */
    addTab: (tab: TabNode<TabData>, options?: {
        index?: number | undefined;
        select?: boolean | undefined;
        tabsetId?: string | undefined;
    }) => boolean;
    /**
     * Close a tab.
     */
    closeTab: (tabId: string) => void;
    /**
     * Close a tabset, along with any tabs it contains (e.g. to remove an empty tabset with the `keepWhenEmpty` flag).
     *
     * ℹ️ Like the rest of the imperative API, this isn't restricted by tabs' `disableClose` flags.
     * If the root tabset is closed, the workspace is left with an empty root tabset.
     */
    closeTabset: (tabsetId: string) => void;
    /**
     * Collapse a tabset to just its header.
     *
     * ℹ️ This has no effect unless the tabset has the `collapsible` flag (or is floating; see `FloatingTabsetNode`);
     * the only tabset in a workspace, and tabsets whose siblings are all collapsed, can't be collapsed.
     */
    collapseTabset: (tabsetId: string) => void;
    /**
     * Expand a collapsed tabset to its previous size.
     *
     * ℹ️ Tabsets are shown at least at their minimum sizes (if they fit), even if the model's sizes are smaller (see `TabsetNode.size`).
     *
     * ℹ️ This has no effect on a tabset that's only collapsed to fit, which is expanded once it fits (see `TabsetNode.collapsible`).
     */
    expandTabset: (tabsetId: string) => void;
    /**
     * Move a tab into a new floating tabset (see `WorkspaceModel.floating`), on top of any other floating tabsets.
     *
     * ℹ️ Parts of the position and size that aren't specified default to those of the tab's tabset, offset slightly down and to the right
     * (and moved, if needed, to fit within the workspace).
     *
     * ℹ️ This has no effect on the only tab of a floating tabset (unless the tabset has the `keepWhenEmpty` flag).
     */
    floatTab: (tabId: string, rect?: Partial<FloatingTabsetRect>) => void;
    /**
     * Move a tabset out of the layout, to float above it (see `WorkspaceModel.floating`), on top of any other floating tabsets.
     *
     * ℹ️ Parts of the position and size that aren't specified default to those of the tabset, offset slightly down and to the right
     * (and moved, if needed, to fit within the workspace).
     *
     * ℹ️ This has no effect on the root tabset (which fills the workspace) or a tabset that's already floating.
     * A maximized tabset is restored first.
     */
    floatTabset: (tabsetId: string, rect?: Partial<FloatingTabsetRect>) => void;
    /**
     * Id of the tabset the user most recently interacted with (by pointer or focus).
     */
    getActiveTabsetId: () => string | undefined;
    /**
     * Get the current model.
     */
    getModel: () => WorkspaceModel<TabData, TabsetData>;
    /**
     * Space (in pixels) in a tabset's tab list that its tabs don't use, e.g. how much a toolbar beside the tabs could grow
     * before they overflow (and how much space an overflow menu needs to free up, once it's negative).
     *
     * ℹ️ The space is measured along the tab list: its width, or its height if its tabs are placed on the left or right
     * (or the tabset is collapsed to a vertical strip).
     * If the tab list can't shrink any further (e.g. it's 0px wide, beside a toolbar that doesn't shrink), the amount the header's content
     * overflows the header is subtracted too, so it's still how much space a toolbar needs to free up.
     *
     * ℹ️ The tab list's `--tab-list-free-space` custom property has the same value (e.g. "120px").
     *
     * ℹ️ Within a tabset (e.g. its toolbar), the `useTabListFreeSpace` hook returns this value (and re-renders when it changes).
     *
     * @returns The free space, or `undefined` if the tabset isn't rendered (or hasn't been measured yet, e.g. while server rendering,
     * or right after the tabset is first rendered: it's measured after React commits, before the browser paints)
     */
    getTabListFreeSpace: (tabsetId: string) => number | undefined;
    /**
     * Maximize a tabset, so that it covers the rest of the workspace.
     *
     * ℹ️ This has no effect on the only tabset in a workspace (the root), which already fills it, or on a floating tabset.
     * A maximized tabset is restored if it becomes the only one (e.g. after the other tabsets are closed).
     */
    maximizeTabset: (tabsetId: string) => void;
    /**
     * Move a tab to a position within a tabset's tab list, to a region of a tabset's content area,
     * or to an `edge` of the workspace (in a new tabset beside all of the other tabsets).
     *
     * ℹ️ The `"left"` and `"right"` regions (and edges) are sides of the screen (so they're mirrored in right-to-left layouts).
     *
     * ℹ️ Floating tabsets can't be split, so a tab moved to an edge region of one is added to it instead (like the `"center"` region).
     */
    moveTab: (tabId: string, target: TabDropTarget) => void;
    /**
     * Move a tabset beside another tabset (by dropping it onto a region at the edge of that tabset's content area),
     * or beside all of the other tabsets (at an `edge` of the workspace),
     * or move its tabs into another tabset (at an `index` within its tab list, or onto the `"center"` of its content area).
     * The `"left"` and `"right"` regions (and edges) are sides of the screen (so they're mirrored in right-to-left layouts).
     *
     * ℹ️ When its tabs are moved, the emptied tabset is removed (unless it has the `keepWhenEmpty` flag).
     *
     * ℹ️ A floating tabset moved beside another tabset (or to an edge of the workspace) is docked: it's moved into the layout, and stops floating.
     * Floating tabsets can't be split, so a tabset moved to an edge region of one has its tabs moved into it instead (like the `"center"` region).
     */
    moveTabset: (tabsetId: string, target: TabDropTarget) => void;
    /**
     * Restore the maximized tabset (if there is one).
     */
    restoreTabset: () => void;
    /**
     * Select a tab within its tabset.
     */
    selectTab: (tabId: string) => void;
    /**
     * Replace the model.
     *
     * @return Applied model (after normalization)
     */
    setModel: (model: WorkspaceModelInput<TabData, TabsetData>) => WorkspaceModel<TabData, TabsetData>;
    /**
     * Subscribe to changes to the free space in a tabset's tab list (see `getTabListFreeSpace`),
     * e.g. from a toolbar rendered outside of the Workspace.
     *
     * ℹ️ The listener is called synchronously when the tab list is measured (when it or its tabs change size, or tabs are added or removed),
     * before the browser paints; changes it makes to the DOM (e.g. with `flushSync`) are shown in the same frame.
     *
     * ℹ️ The listener is called with `undefined` when the tabset is removed (e.g. closed, or merged into another tabset).
     *
     * @returns A function that unsubscribes the listener
     */
    subscribeToTabListFreeSpace: (tabsetId: string, listener: (freeSpace: number | undefined) => void) => () => void;
    /**
     * Update a tab; fields that are not specified are not changed.
     *
     * ℹ️ `data` is replaced rather than merged.
     */
    updateTab: (tabId: string, changes: {
        data?: TabData;
        disableClose?: boolean | undefined;
        disableDrag?: boolean | undefined;
        title?: string | undefined;
    }) => void;
    /**
     * Update a tabset; fields that are not specified are not changed.
     *
     * ℹ️ `data` is replaced rather than merged.
     *
     * ℹ️ Setting `minHeight`, `minWidth`, or `tabPlacement` to `undefined` removes the tabset's override,
     * so the corresponding Workspace prop is used; setting `maxHeight` or `maxWidth` to `undefined` removes the maximum.
     *
     * ℹ️ The position and size (`x`, `y`, `width`, and `height`) of a floating tabset can be changed too (and are ignored for other tabsets),
     * as can be its `collapsible` flag (which is ignored for floating tabsets).
     */
    updateTabset: (tabsetId: string, changes: {
        collapsible?: boolean | undefined;
        data?: TabsetData;
        disableDrag?: boolean | undefined;
        height?: number | undefined;
        keepWhenEmpty?: boolean | undefined;
        maxHeight?: string | undefined;
        maxWidth?: string | undefined;
        minHeight?: string | undefined;
        minWidth?: string | undefined;
        tabPlacement?: TabsetNode["tabPlacement"];
        width?: number | undefined;
        x?: number | undefined;
        y?: number | undefined;
    }) => void;
}

/**
 * Serializable description of a workspace's layout.
 */
export declare type WorkspaceModel<TabData = unknown, TabsetData = unknown> = {
    /**
     * Format version; allows the workspace to migrate models saved by older versions.
     */
    version: 1;
    /**
     * Root of the layout tree: a split or a tabset.
     *
     * ℹ️ An empty workspace is a tabset with no tabs.
     */
    root: WorkspaceNode<TabData, TabsetData>;
    /**
     * Tabsets that float above the layout, in stacking order (the last one is on top).
     *
     * ℹ️ Floating tabsets are created with the `floatTab` and `floatTabset` methods.
     * Dragging a floating tabset's header (or its `TabsetDragHandle`) moves it, its edges resize it, and pressing it brings it to the front.
     * Its tabs can be dragged into the layout (and other tabs can be dropped into it), and an emptied floating tabset is removed (unless it has the `keepWhenEmpty` flag).
     *
     * ℹ️ Tabset (and tab) ids are unique across the layout and its floating tabsets.
     */
    floating?: FloatingTabsetNode<TabData, TabsetData>[] | undefined;
    /**
     * Id of the tabset that is maximized, if any.
     *
     * ℹ️ Floating tabsets can't be maximized; they're shown above the maximized tabset, and still accept dropped tabs.
     */
    maximizedTabsetId?: string | undefined;
};

/**
 * A `WorkspaceModel` whose splits and tabsets may omit their ids; accepted by the `defaultModel` prop and the `setModel` method.
 */
export declare type WorkspaceModelInput<TabData = unknown, TabsetData = unknown> = Omit<WorkspaceModel<TabData, TabsetData>, "floating" | "root"> & {
    floating?: FloatingTabsetNodeInput<TabData, TabsetData>[] | undefined;
    root: WorkspaceNodeInput<TabData, TabsetData>;
};

/**
 * A node in the workspace's layout tree: either a split or a tabset.
 */
export declare type WorkspaceNode<TabData = unknown, TabsetData = unknown> = SplitNode<TabData, TabsetData> | TabsetNode<TabData, TabsetData>;

export declare type WorkspaceNodeInput<TabData = unknown, TabsetData = unknown> = SplitNodeInput<TabData, TabsetData> | TabsetNodeInput<TabData, TabsetData>;

export declare type WorkspaceProps<TabData = unknown, TabsetData = unknown> = Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue"> & {
    /**
     * CSS class name.
     */
    className?: string | undefined;
    /**
     * CSS class names for the elements the workspace renders within its root element:
     * - `tabset`: root element of a tabset (`data-tabset`)
     * - `header`: contains a tabset's tab list and toolbar (`data-tabset-header`)
     * - `tabList`: contains a tabset's tabs (`data-tab-list`)
     * - `tab`: passed to `renderTab` with the rest of a tab's props (`data-tab`)
     * - `toolbar`: contains the content returned by `renderTabsetToolbar` (`data-tabset-toolbar`)
     * - `tabPanels`: contains a tabset's tab content (`data-tab-panels`)
     * - `tabContent`: the element each tab's content is rendered into (`data-tab-content`)
     * - `dropIndicator`: shows where a dragged tab will be dropped within a tabset's panels, or at an edge of the workspace (`data-drop-indicator`)
     * - `dragPreview`: follows the pointer while a tab or tabset is dragged (`data-drag-preview`)
     *
     * ℹ️ Elements expose their state as data attributes (e.g. `data-tab-selected`, or `data-tabset-dragging` while a tabset is dragged), which can be used for styling.
     * Elements within a collapsed tabset have a `data-tabset-collapsed` attribute.
     * Elements within a tabset also have a `data-tab-placement` attribute (see `tabPlacement`).
     *
     * ℹ️ The drop indicator is the same element for the whole drag (rendered within the workspace's root element),
     * so it can be animated between regions and tabsets (e.g. `transition: inset 250ms`).
     * Its `data-region` attribute is the region of a tabset's panels it covers, or its `data-edge` attribute is the edge of the workspace it's at;
     * while a tab isn't over either, it has neither and isn't shown (`opacity: 0`).
     *
     * ℹ️ Like the render props, this object is part of what tabsets re-render for;
     * in large workspaces, define it outside of the component (or memoize it) rather than inline.
     */
    classNames?: WorkspaceClassNames | undefined;
    /**
     * Initial layout of the workspace.
     *
     * ℹ️ Splits and tabsets may omit their ids; they're assigned ids based on their position (see `WorkspaceModelInput`).
     *
     * ℹ️ This value is only used when the Workspace mounts; use the imperative `setModel` method to replace it later.
     */
    defaultModel: WorkspaceModelInput<TabData, TabsetData>;
    /**
     * Locks the arrangement: tabs cannot be resized, dragged, dropped, or closed by the user.
     * Selecting tabs and maximizing tabsets still work.
     *
     * ℹ️ This prop overrides the `disableClose` and `disableDrag` flags of individual tabs.
     */
    disabled?: boolean | undefined;
    /**
     * Keeps drags between workspaces (see `dragGroup`) within this copy of the application:
     * tabs dragged from this workspace can't be dropped into other copies of the application (e.g. the application loaded in another browser window or tab), and tabs dragged from other copies can't be dropped into this workspace.
     * Workspaces in popout windows rendered by this copy of the application (with portals) are still part of the group.
     *
     * Defaults to `false`, so that workspaces with the same `dragGroup` in other copies of the application from the same origin can exchange tabs.
     */
    disableDragBetweenApps?: boolean | undefined;
    /**
     * Prevents tabs (and tabsets) from being dropped onto some (or all) targets.
     *
     * Functions are called when the target under the pointer changes;
     * returning `true` rejects the target.
     *
     * ℹ️ While a tabset is dragged, this function is called for each of its tabs (see `DisableDropArgs`),
     * so restrictions on where tabs can be dropped apply to dragged tabsets too.
     *
     * ℹ️ Tabs can also be dropped at the edges of the workspace (beside all of the other tabsets), within a few pixels of the edges of its layout
     * (except over tabset headers, where the tab lists are) or within its root element's padding.
     * These targets have an `edge` rather than a `tabsetId`; `disableDrop={({ target }) => "edge" in target}` turns them off.
     */
    disableDrop?: boolean | ((args: DisableDropArgs<TabData, TabsetData>) => boolean) | undefined;
    /**
     * Lets tabs (and tabsets) be dragged between workspaces with the same `dragGroup`,
     * including workspaces in popout windows (opened by the application and rendered into with a portal)
     * and in other copies of the application from the same origin, e.g. the application loaded in another browser window or tab (see `disableDragBetweenApps`).
     * Dropping one into another workspace moves it there, keeping its id and data;
     * both workspaces report the change to `onModelChanged` with the `"transfer"` reason.
     *
     * Mouse drags use the browser's drag and drop when this prop is set, since pointer events can't follow the pointer into another window.
     * Touch drags still use pointer events, so they can't leave the window.
     *
     * ℹ️ Tab ids must be unique within the group; a tab can't be dropped into a workspace that already has a tab with its id (and a tabset with the `keepWhenEmpty` flag can't be dragged to another workspace).
     * A tab dragged to another workspace is rendered by that workspace, so its content is mounted again.
     *
     * ⚠️ A tab dragged to another copy of the application is sent there with the structured clone algorithm (like `postMessage`), so its data must be cloneable (e.g. no functions);
     * tabs whose data can't be cloned (and tabsets containing them) can only be dragged within their copy of the application.
     * Copies loaded at different times may be running different versions of the application, so the other copy may need to handle tab data it doesn't recognize.
     *
     * ⚠️ Tabs (and tabsets) can still be torn off (see `onTearOff`), but some browsers (e.g. Safari) block popup windows opened at the end of a drag that uses the browser's drag and drop.
     */
    dragGroup?: string | undefined;
    /**
     * Ref attached to the root `HTMLDivElement`.
     */
    elementRef?: Ref<HTMLDivElement | null> | undefined;
    /**
     * What happens to the content of tabs that are not selected.
     * Can be a function to choose per tab (e.g. based on its data).
     *
     * - `"keep-mounted"`: content stays mounted (and its effects keep running)
     * - `"activity"`: content stays mounted but is rendered within a hidden React `<Activity>` boundary, so its effects are unmounted;
     *   requires React 19.2 (falls back to `"keep-mounted"` otherwise)
     * - `"unmount"`: content is unmounted
     *
     * ℹ️ Moving a tab never remounts its content.
     *
     * ⚠️ Its React state is preserved, but its elements are moved within the document, which resets some browser state:
     * iframes are reloaded, playing media is paused, and focused elements are blurred.
     *
     * @default "keep-mounted"
     */
    hiddenTabBehavior?: HiddenTabBehavior | ((tab: TabNode<TabData>) => HiddenTabBehavior) | undefined;
    /**
     * Uniquely identifies this workspace within an application.
     * Falls back to `useId` when not provided.
     *
     * ℹ️ This value will also be assigned to the `id` and `data-testid` attributes (an explicit `data-testid` prop will take precedence).
     */
    id?: string | number | undefined;
    /**
     * Called after the model has changed (e.g. a tab was moved, selected, or closed, or a tabset was resized).
     *
     * ℹ️ For changes caused by pointer events, this callback is not called until the pointer has been released.
     * This callback is recommended for saving models to storage.
     */
    onModelChanged?: (model: WorkspaceModel<TabData, TabsetData>, meta: WorkspaceChangedMeta) => void;
    /**
     * Called when a tab (or a whole tabset) is dropped outside of the window, e.g. to open it in a popup window.
     * Return `true` to accept it, which removes it from this workspace (reported to `onModelChanged` with the `"tear-off"` reason);
     * otherwise nothing changes.
     *
     * Tabs and tabsets can only be torn off if they could be dragged, and tabsets with the `keepWhenEmpty` flag can't be torn off.
     * Without this prop, dropping a tab outside of the window does nothing.
     *
     * ⚠️ The Workspace can't tell whether the application showed the tab, so check whether `window.open` returned `null` (because the popup was blocked)
     * and return `false` then to keep the tab; returning `true` removes it even if nothing shows it.
     *
     * ℹ️ This is called while the release of the pointer is being handled (which browsers treat as user input), so a popup can be opened from it.
     * With the `dragGroup` prop, a tab is torn off when it's dropped outside of every window in the group; the end of those drags isn't treated as user input,
     * so browsers block popups opened then unless the drag started a few seconds earlier at most (and Safari blocks them always).
     */
    onTearOff?: ((args: TearOffArgs<TabData, TabsetData>) => boolean) | undefined;
    /**
     * Content of the element that follows the pointer while a tab is being dragged.
     * Defaults to the tab's title (or id).
     *
     * ℹ️ The element has a `data-tear-off` attribute while releasing the pointer would tear off the tab (see `onTearOff`).
     */
    renderDragPreview?: ((tab: TabNode<TabData>, state: DragPreviewState) => ReactNode) | undefined;
    /**
     * Content of the element that follows the pointer while a whole tabset is being dragged.
     * Defaults to the title (or id) of its selected tab followed by the number of other tabs being dragged (e.g. "One (+2)"), or the selected tab's `renderDragPreview` when that prop is set, or the tabset's id if it has no tabs.
     *
     * ℹ️ The element has a `data-drag-type` attribute: `"tabset"` while a tabset is dragged, and `"tab"` while a tab is.
     * It also has a `data-tear-off` attribute while releasing the pointer would tear off the tabset (see `onTearOff`).
     */
    renderTabsetDragPreview?: ((tabset: TabsetNode<TabData, TabsetData>, state: DragPreviewState) => ReactNode) | undefined;
    /**
     * Content shown in the panels of a tabset that has no tabs (e.g. "Drag a tab here"):
     * the root tabset of an empty workspace, or a tabset with the `keepWhenEmpty` flag.
     */
    renderEmptyTabset?: ((tabset: TabsetNode<TabData, TabsetData>) => ReactNode) | undefined;
    /**
     * Separator rendered between the children of a split.
     * Should return a `Separator` (or `null` for no separator); defaults to an unstyled `Separator`.
     *
     * ℹ️ Without separators, tabsets can still be resized by dragging their edges (like Panels in a Group without separators),
     * but separators are recommended: they can be resized with the keyboard,
     * and an edge's hit area can overlap the tabs beside it (pressing there resizes the tabset rather than dragging the tab).
     */
    renderSeparator?: ((orientation: Orientation) => ReactNode) | undefined;
    /**
     * Renders a tab (within its tabset's tab list).
     * Spread `props` onto the returned element:
     * they make it a tab (its role and ARIA attributes, keyboard and pointer handling, and data attributes),
     * and attach a `ref` that dragging and keyboard focus depend on.
     *
     * ```tsx
     * renderTab={(tab, props) => (
     *   <div {...props}>
     *     {tab.title}
     *     <TabCloseButton />
     *   </div>
     * )}
     * ```
     *
     * Individual props can be overridden or wrapped, e.g. to confirm before the Delete key closes a tab
     * (call `props.onKeyDown` for other keys).
     *
     * ⚠️ Merge `className` and `style` rather than replacing them (e.g. `style={{ ...props.style, padding: 4 }}`):
     * they include the `tab` entries of the `classNames` and `styles` props, and `style` includes the `touch-action` that touch dragging depends on.
     *
     * ℹ️ Pointer and keyboard events from interactive descendants (`button` elements, `role="button"`, or elements with a `data-tab-ignore` attribute) are ignored,
     * so clicking a button within a tab doesn't select or drag it.
     *
     * ℹ️ When this prop is not provided, tabs show their title (or id) followed by a `TabCloseButton`.
     */
    renderTab?: ((tab: TabNode<TabData>, props: TabRenderProps) => ReactNode) | undefined;
    /**
     * Content of a tab.
     *
     * ℹ️ Content is only re-rendered when its tab changes or this function does;
     * a function created while rendering (e.g. an inline arrow function) re-renders the content of every tab whenever the Workspace's parent re-renders,
     * so it should be memoized (e.g. with `useCallback`) when tab content is expensive to render.
     */
    renderTabContent: (tab: TabNode<TabData>) => ReactNode;
    /**
     * Content shown after a tabset's tab list (e.g. buttons to add a tab or maximize the tabset).
     *
     * ℹ️ The `useParentTabset` and `useParentTabsetState` hooks can be used within this content.
     */
    renderTabsetToolbar?: ((tabset: TabsetNode<TabData, TabsetData>) => ReactNode) | undefined;
    /**
     * Controls whether pointer dragging updates sizes immediately,
     * or renders overlay separator previews until the pointer is released.
     *
     * @default "panel"
     */
    resizePreviewMode?: ResizePreviewMode | undefined;
    /**
     * Render the content of selected tabs on the server.
     * Can be a function to choose per tab (e.g. based on its data).
     *
     * Tab content is rendered through portals (so that moving a tab doesn't remount it), which React can't render on the server.
     * Content opted into server rendering is rendered inline instead, then moved into a portal once hydration has finished.
     *
     * ⚠️ That move remounts the content once (e.g. resetting its state and re-running its effects),
     * so this is best suited to content that is cheap to mount and benefits from being in the server-rendered HTML.
     *
     * ℹ️ This prop has no effect for workspaces that are not server rendered.
     *
     * @default false
     */
    serverRenderTabContent?: boolean | ((tab: TabNode<TabData>) => boolean) | undefined;
    /**
     * CSS properties.
     */
    style?: CSSProperties | undefined;
    /**
     * CSS properties for the elements the workspace renders within its root element (see `classNames`).
     */
    styles?: WorkspaceStyles | undefined;
    /**
     * Where tabs are placed relative to tab content.
     *
     * Tabs placed on the left or right are stacked ("vertical"):
     * this determines how a dropped tab's position is found and which arrow keys move focus between tabs.
     *
     * ℹ️ Elements within a tabset have a `data-tab-placement` attribute, which can be used for styling (e.g. rotating tabs on the left or right).
     *
     * ℹ️ "left" and "right" are the start and end of the tabset (its header is rendered before or after its content),
     * so in a right-to-left layout (e.g. within `dir="rtl"`) tabs placed on the "left" are on the right;
     * styles for them should use logical properties (e.g. `border-inline-end` rather than `border-right`).
     *
     * ℹ️ Tabsets can override this with the `tabPlacement` field of their model node.
     *
     * @default "top"
     */
    tabPlacement?: "bottom" | "left" | "right" | "top" | undefined;
    /**
     * Which tab is selected when a tabset's selected tab is removed (closed, or dragged to another tabset):
     * - `"adjacent"`: the tab after it (or before it, if it was the last tab)
     * - `"recent"`: the tabset's most recently selected tab (like an IDE's editor groups),
     *   falling back to `"adjacent"` if none of its other tabs has been selected
     *
     * ℹ️ In `"recent"` mode, each tabset's recently selected tabs are saved in the model (see `TabsetNode.recentTabIds`),
     * so they're restored with the rest of the layout.
     *
     * @default "adjacent"
     */
    tabRemovalSelectionBehavior?: TabRemovalSelectionBehavior | undefined;
    /**
     * Minimum height of each tabset's content area (not including its header).
     *
     * ℹ️ Tabsets can override this with the `minHeight` field of their model node.
     *
     * ℹ️ Interpretation rules:
     * - Strings must specify a unit: "px", "em", "rem", "vh", or "vw" (e.g. `tabsetMinHeight: "200px"`)
     * - Percentages (and strings without units) are not allowed
     */
    tabsetMinHeight?: string | undefined;
    /**
     * Minimum width of each tabset's content area (not including its header).
     *
     * ℹ️ Tabsets can override this with the `minWidth` field of their model node.
     *
     * ℹ️ Interpretation rules:
     * - Strings must specify a unit: "px", "em", "rem", "vh", or "vw" (e.g. `tabsetMinWidth: "200px"`)
     * - Percentages (and strings without units) are not allowed
     */
    tabsetMinWidth?: string | undefined;
    /**
     * Exposes the imperative API (see `WorkspaceImperativeHandle`).
     *
     * ℹ️ The `useWorkspaceRef` and `useWorkspaceCallbackRef` hooks are exported for convenience in TypeScript projects.
     */
    workspaceRef?: Ref<WorkspaceImperativeHandle<TabData, TabsetData> | null> | undefined;
};

/**
 * CSS properties for the elements a Workspace renders (see the Workspace's `classNames` prop).
 */
export declare type WorkspaceStyles = {
    [Element in keyof WorkspaceClassNames]?: CSSProperties | undefined;
};

export { }
