
import { Styles } from "../../../tasty/styles/types.js";
import "../../../tasty/index.js";
import { WithCloseBehavior } from "../Modal/types.js";
import "../Modal/index.js";
import { ReactElement, RefObject } from "react";
import * as react_jsx_runtime0 from "react/jsx-runtime";
import { OverlayTriggerProps, Placement, PositionProps } from "react-aria";
import { OverlayTriggerState } from "react-stately";

//#region src/components/overlays/Dialog/DialogTrigger.d.ts
type CubeDialogClose = (close: () => void) => ReactElement;
interface CubeDialogTriggerProps extends OverlayTriggerProps, PositionProps, WithCloseBehavior {
  /** The Dialog and its trigger element. See the DialogTrigger [Content section](#content) for more information on what to provide as children. */
  children: [ReactElement | ((state: OverlayTriggerState) => ReactElement), CubeDialogClose | ReactElement];
  /**
   * The type of Dialog that should be rendered. See the DialogTrigger [types section](#dialog-types) for an explanation on each.
   * @default 'modal'
   */
  type?: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover' | 'panel';
  /** The type of Dialog that should be rendered when on a mobile device. See DialogTrigger [types section](#dialog-types) for an explanation on each. */
  mobileType?: 'modal' | 'tray' | 'fullscreen' | 'fullscreenTakeover' | 'panel' | 'popover';
  placement?: Placement;
  /**
   * Whether a popover type Dialog's arrow should be hidden.
   */
  hideArrow?: boolean;
  /** The ref of the element the Dialog should visually attach itself to. Defaults to the trigger button if not defined. */
  targetRef?: RefObject<HTMLElement | null>;
  /** Whether a modal type Dialog should be dismissable. */
  isDismissable?: boolean;
  /** Whether pressing the escape key to close the dialog should be disabled. */
  isKeyboardDismissDisabled?: boolean;
  /** The screen breakpoint for the mobile type */
  mobileViewport?: number;
  /** The style map for the overlay **/
  styles?: Styles;
  shouldCloseOnInteractOutside?: (element: Element) => boolean;
  onDismiss?: (action?: string) => void;
  isOpen?: boolean;
  onOpenChange?: (isOpen: boolean) => void;
  defaultOpen?: boolean;
  shouldFlip?: boolean;
  shouldUpdatePosition?: boolean;
  /** Minimum padding in pixels between the popover and viewport edges */
  containerPadding?: number;
}
/**
 * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's
 * open state with the trigger's press state. Additionally, it allows you to customize the type and
 * positioning of the Dialog.
 */
declare function DialogTrigger(props: CubeDialogTriggerProps): react_jsx_runtime0.JSX.Element;
//#endregion
export { CubeDialogClose, CubeDialogTriggerProps, DialogTrigger };
//# sourceMappingURL=DialogTrigger.d.ts.map