
import { LayoutConstraint, ResizeHandleAxis } from "./grid-core/types.js";
import { ContainerStyleProps, Styles } from "@tenphi/tasty";
import { ReactNode } from "react";

//#region src/components/layout/Board/Widget.d.ts
interface CubeBoardWidgetProps extends ContainerStyleProps {
  /** Unique id, must match the `i` of a layout item in a `Board`. */
  id: string;
  /** Widget content. */
  children?: ReactNode;
  /** Disable dragging for this widget. */
  isDraggable?: boolean;
  /** Disable resizing for this widget. */
  isResizable?: boolean;
  /** Which resize handles to show (overrides the board default). */
  resizeHandles?: ResizeHandleAxis[];
  /**
   * Render this widget as a card by adding a border. Widgets are always filled
   * (`#surface-2`) and rounded; `isCard` adds the border on top. Defaults to
   * `false` (borderless) unless the owning `Board`'s `widgetProps.isCard` opts
   * in. Override per widget to enable or disable.
   */
  isCard?: boolean;
  /** Minimum width in grid columns (used when the layout item omits `minW`). */
  minW?: number;
  /** Maximum width in grid columns (used when the layout item omits `maxW`). */
  maxW?: number;
  /** Minimum height in grid rows (used when the layout item omits `minH`). */
  minH?: number;
  /** Maximum height in grid rows (used when the layout item omits `maxH`). */
  maxH?: number;
  /** Per-widget layout constraints. */
  constraints?: LayoutConstraint[];
  /** Test id applied to the rendered widget element. */
  qa?: string;
  /**
   * Style overrides applied to the rendered widget element. Individual style
   * props (`fill`, `padding`, `radius`, `border`, ...) can also be passed
   * directly on `Board.Widget`, just like on `Board`; they are merged into
   * these styles (a direct prop wins over the same key in the `styles` object).
   */
  styles?: Styles;
  /**
   * Grow this widget's height in its board to fit its content (only ever
   * increases). Pair with a nested `Board isAligned` to make the container
   * expand until the inner board's rows fit at the parent's row height.
   */
  isAutoHeight?: boolean;
  /**
   * CSS selector for elements that must not start a pointer drag inside this
   * widget (overrides the board's `dragCancel`).
   */
  dragCancel?: string;
  /**
   * CSS selector for the only elements from which a pointer drag may start
   * inside this widget (overrides the board's `dragHandle`).
   */
  dragHandle?: string;
}
/**
 * Declares a widget's content and per-widget options. Rendering and positioning
 * are performed by the owning `Board` (the component itself renders nothing),
 * which is what allows a widget to be transferred between boards.
 */
declare function Widget(props: CubeBoardWidgetProps): null;
//#endregion
export { CubeBoardWidgetProps, Widget };
//# sourceMappingURL=Widget.d.ts.map