import { ReactNode } from 'react';
import { WindowBaseSlots } from './slots/WindowBaseEnum';
import { WINDOW_BASE_KEY_COMPONENT } from './constants';
import { Theme } from '@mui/material/styles';
import { Sizes } from '@m4l/styles';
import { MenuItemAction } from '../MenuActions/types';
import { M4LOverridesStyleRules } from '../../@types/augmentations';
import { EmergeType } from '../areas/types';
import { TooltipProps, IconProps } from '@m4l/base';
/**
 * Opciones para la ventana.
 */
export type WindowOptions = {
    /**
     * Indica si se permitirá persistir las cookies.
     */
    allowPersistCookies: boolean;
};
export type JSX_REACT_NODE = ((props?: any) => JSX.Element) | JSX.Element;
/**
 * Tipo que representa el tipo de ventana: microfrontend o componente.
 */
export type WinType = 'microfrontend' | 'component';
/**
 * Tipo que representa el tipo de visibilidad de la acción de ventana.
 * main: Se muestra en el header de la ventana pero si está en mobile se muestra en el menú inside.
 * allways: Se muestra en el header de la ventana así esté en mobile.
 * normal: Se muestra inside del menu.
 */
export type WindowActionType = 'main' | 'allways' | 'normal';
export interface BaseModuleAction {
    type?: 'menuItem' | 'groupActions';
    /**
     * Tipo de visibilidad de la acción de ventana.
     *
     */
    visibility: WindowActionType;
    /**
     * Clave única de la acción de ventana.
     */
    key: string;
    /**
     * Etiqueta opcional para la acción de ventana.
     */
    tag?: any;
}
export type ModuleMenuItemAction = Pick<MenuItemAction, 'label' | 'selected' | 'color' | 'disabled' | 'checkable' | 'checked' | 'onClick'> & {
    /**
     * Icono opcional para la acción de ventana.
     */
    iconUrl: string;
    /**
     * Clase CSS opcional para la acción de ventana.
     */
    className?: string;
};
export interface ModuleActionMenuItem extends BaseModuleAction, ModuleMenuItemAction {
    type?: 'menuItem';
}
export type GroupActionMenuItem<T extends string = string> = ModuleMenuItemAction & {
    key: T;
};
export interface ModuleActionGroup<T extends string = string> extends BaseModuleAction {
    type: 'groupActions';
    /**
     * Clave de la acción seleccionada.
     */
    selectedActionKey: T;
    /**
     * Lista de acciones del grupo.
     */
    actions: Array<GroupActionMenuItem<T>>;
}
export type ModuleAction = ModuleActionMenuItem | ModuleActionGroup;
export type WindowBaseModuleAction = Omit<ModuleActionMenuItem, 'visibility'> | Omit<ModuleActionGroup, 'visibility'>;
/**
 * Type representing a single action in the `WindowBase` component.
 */
export type WindowBaseAction = WindowBaseModuleAction & {
    place: 'left' | 'right' | 'inside';
    className?: string;
    /**
     * Props for the tooltip.
     */
    tooltipProps?: Omit<TooltipProps, 'sx' | 'children' | 'title'>;
};
/**
 * Interface representing the main properties of the `WindowBase` component.
 */
export interface WindowBaseProps {
    /**
     * The main title of the window.
     * This property is required and displayed prominently at the top of the window.
     */
    title: string;
    /**
     * An optional subtitle for the window.
     * Typically displayed below the main title to provide additional context or details.
     */
    subTitle?: string;
    /**
     * The content to be rendered inside the window.
     * This can include any valid React node or JSX.
     */
    children: ReactNode;
    /**
     * URL of the icon displayed in the header of the window.
     * This is optional and used to provide a visual identifier for the window.
     */
    iconUrl?: IconProps['icon'];
    /**
     * The visual style of the window.
     * - `'outlined'`: Displays the window with an outlined border.
     * - `'text'`: Displays the window with minimal styling, emphasizing the content.
     * Default is `'outlined'` if not specified.
     */
    variant?: 'outlined' | 'text';
    /**
     * Size of the window.
     * - `'small'`: A compact window size.
     * - `'medium'`: A standard window size.
     * Default is `'medium'` if not specified.
     */
    size?: Extract<Sizes, 'small' | 'medium'>;
    /**
     * Indicates if the window is currently selected.
     * When `true`, the window may display a visual indicator to denote selection.
     */
    selected?: boolean;
    /**
     * Indicates if the window is collapsed.
     * When `true`, the window may display a visual indicator to denote collapse.
     */
    collapsed?: boolean;
    /**
     * Indicates if the window is maximized.
     * When `true`, the window may display a visual indicator to denote maximization.
     */
    maximized?: boolean;
    /**
     * The version label for the window.
     * Useful for displaying version information (e.g., `1.0.0`) in the header or footer.
     */
    version?: string;
    /**
     * The build time for the window. si se proporcionana mostrá la versión y la fecha de compilación.
     *
     */
    buildTime?: string;
    /**
     * A unique identifier for automated testing.
     * Provides a `data-testid` attribute for querying this component in tests.
     */
    dataTestId?: string;
    /**
     * Callback function executed when the window is closed.
     * Typically triggered by a close button or similar action.
     */
    onClose?: VoidFunction;
    /**
     * List of actions to display in the window.
     * Each action defines its placement, icon, label, and other properties.
     */
    actions?: WindowBaseAction[];
    /**
     * An optional class name to apply to the root element of the component.
     */
    className?: string;
    /**
     * Indicates if the window is in a loading state.
     */
    isLoading?: boolean;
    /**
     * A unique identifier for the window.
     * This is used to identify and manage multiple windows.
     */
    windowId?: string;
    /**
     * "onMouseDown" event handler for the window.
     */
    onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
    /**
     * Additional information displayed in the window.
     */
    editionInfo?: string;
    /**
     * Type of window.
     * - `'modal'`: A modal window.
     * - `'window'`: A window.
     * Default is `'window'` if not specified.
     */
    emergeType?: EmergeType;
    /**
     * Indicates if the window is draggable.
     */
    draggable?: boolean;
}
/**
 * Type representing the possible values of `WindowBaseSlots`.
 *
 * This is used to map slot identifiers for the `WindowBase` component.
 */
export type WindowBaseType = keyof typeof WindowBaseSlots;
/**
 * Owner state (`ownerState`) for the `WindowBase` component.
 *
 * Defines properties that influence the styles and behavior of the component.
 * windowBaseColor (optional) - Color applied to the component.
 * windowBaseSelected (optional) - Indicates if the component is selected.
 * windowBaseVariant (optional) - Visual variant of the component (`'outlined'` or `'text'`).
 * windowBaseSize (optional) - Size of the component (`'small'` or `'medium'`).
 */
export type WindowBaseOwnerState = {
    selected?: WindowBaseProps['selected'];
    collapsed?: WindowBaseProps['collapsed'];
    maximized?: WindowBaseProps['maximized'];
    variant?: WindowBaseProps['variant'];
    size?: WindowBaseProps['size'];
    emergeType?: WindowBaseProps['emergeType'];
    draggable?: WindowBaseProps['draggable'];
};
/**
 * Type for defining custom styles for the `WindowBase` component.
 *
 * Allows overriding default styles for each slot of the `WindowBase` component using MUI's `OverridesStyleRules`.
 * WindowBaseType - Represents the style overrides for the component slots.
 * WINDOW_BASE_KEY_COMPONENT - Key used to register the `WindowBase` component with the theme.
 * Theme - The theme object containing styling information.
 */
export type WindowBaseStyles = M4LOverridesStyleRules<WindowBaseType, typeof WINDOW_BASE_KEY_COMPONENT, Theme>;
//# sourceMappingURL=types.d.ts.map