import type { ReactElement, HTMLAttributes, Ref } from "react";
import type SlSplitPanelElement from "@shoelace-style/shoelace/dist/components/split-panel/split-panel.js";
import { SlRepositionEvent } from "../events";
export type { SlSplitPanelElement };
export type SlSplitPanelRepositionEvent =
SlRepositionEvent;
export interface SlSplitPanelProps extends HTMLAttributes {
ref?: Ref;
/**
* The current position of the divider from the primary panel's edge as a percentage 0-100. Defaults to 50% of the
* container's initial size.
*/
position?: number;
/**
* The current position of the divider from the primary panel's edge in pixels.
*/
positionInPixels?: number;
/**
* Draws the split panel in a vertical orientation with the start and end panels stacked.
*/
vertical?: boolean;
/**
* Disables resizing. Note that the position may still change as a result of resizing the host element.
*/
disabled?: boolean;
/**
* If no primary panel is designated, both panels will resize proportionally when the host element is resized. If a
* primary panel is designated, it will maintain its size and the other panel will grow or shrink as needed when the
* host element is resized.
*/
primary?: "start" | "end" | undefined;
/**
* Either one or more space-separated values at which the divider should snap, in pixels, percentages, or repeat expressions e.g. `'100px 50% 500px' or `repeat(50%) 10px`,
* or a function which takes in a `SnapFunctionParams`, and returns a position to snap to, e.g. `({ pos }) => Math.round(pos / 8) * 8`.
*/
snap?: string | SnapFunction;
/**
* How close the divider must be to a snap point until snapping occurs.
*/
snapThreshold?: number;
/**
* Emitted when the divider's position changes.
*/
onSlReposition?: (event: SlSplitPanelRepositionEvent) => void;
/**
* Emitted when the divider's position changes.
*/
onSlRepositionCapture?: (event: SlSplitPanelRepositionEvent) => void;
}
/**
* Split panels display two adjacent panels, allowing the user to reposition them.
*/
export default function SlSplitPanel(
props: SlSplitPanelProps,
): ReactElement;