import type { ICancelEventDetail, IEventDetail } from '@breadstone/mosaik-elements';
/**
 * Represents the region type for item positioning within a column.
 *
 * @public
 */
export type FlowBoardItemRegion = 'pinned' | 'normal';
/**
 * Event detail for before-column-reorder events.
 *
 * @public
 */
export interface IFlowBoardBeforeColumnReorderEventDetail extends ICancelEventDetail {
    /**
     * The key of the column being reordered.
     */
    readonly columnKey: string;
    /**
     * The original index of the column.
     */
    readonly fromIndex: number;
    /**
     * The target index for the column.
     */
    readonly toIndex: number;
}
/**
 * Event fired before a column is reordered.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeColumnReorderEvent = CustomEvent<IFlowBoardBeforeColumnReorderEventDetail>;
/**
 * Event detail for column-reorder events.
 *
 * @public
 */
export interface IFlowBoardColumnReorderEventDetail extends IEventDetail {
    /**
     * The key of the column that was reordered.
     */
    readonly columnKey: string;
    /**
     * The original index of the column.
     */
    readonly fromIndex: number;
    /**
     * The new index of the column.
     */
    readonly toIndex: number;
}
/**
 * Event fired when a column has been reordered.
 *
 * @public
 */
export type FlowBoardColumnReorderEvent = CustomEvent<IFlowBoardColumnReorderEventDetail>;
/**
 * Event detail for before-item-reorder events (same column).
 *
 * @public
 */
export interface IFlowBoardBeforeItemReorderEventDetail extends ICancelEventDetail {
    /**
     * The key of the item being reordered.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly columnKey: string;
    /**
     * The original index of the item.
     */
    readonly fromIndex: number;
    /**
     * The target index for the item.
     */
    readonly toIndex: number;
    /**
     * The offset of pinned items in the column.
     */
    readonly pinnedOffset: number;
    /**
     * The region where the item is being moved.
     */
    readonly region: FlowBoardItemRegion;
}
/**
 * Event fired before an item is reordered within the same column.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeItemReorderEvent = CustomEvent<IFlowBoardBeforeItemReorderEventDetail>;
/**
 * Event detail for item-reorder events (same column).
 *
 * @public
 */
export interface IFlowBoardItemReorderEventDetail extends IEventDetail {
    /**
     * The key of the item that was reordered.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly columnKey: string;
    /**
     * The original index of the item.
     */
    readonly fromIndex: number;
    /**
     * The new index of the item.
     */
    readonly toIndex: number;
}
/**
 * Event fired when an item has been reordered within the same column.
 *
 * @public
 */
export type FlowBoardItemReorderEvent = CustomEvent<IFlowBoardItemReorderEventDetail>;
/**
 * Event detail for before-item-move events (cross column).
 *
 * @public
 */
export interface IFlowBoardBeforeItemMoveEventDetail extends ICancelEventDetail {
    /**
     * The key of the item being moved.
     */
    readonly itemKey: string;
    /**
     * The key of the source column.
     */
    readonly fromColumnKey: string;
    /**
     * The key of the target column.
     */
    readonly toColumnKey: string;
    /**
     * The original index of the item in the source column.
     */
    readonly fromIndex: number;
    /**
     * The target index in the destination column.
     */
    readonly toIndex: number;
    /**
     * The offset of pinned items in the target column.
     */
    readonly pinnedOffset: number;
    /**
     * The region where the item is being moved.
     */
    readonly toRegion: FlowBoardItemRegion;
}
/**
 * Event fired before an item is moved to a different column.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeItemMoveEvent = CustomEvent<IFlowBoardBeforeItemMoveEventDetail>;
/**
 * Event detail for item-move events (cross column).
 *
 * @public
 */
export interface IFlowBoardItemMoveEventDetail extends IEventDetail {
    /**
     * The key of the item that was moved.
     */
    readonly itemKey: string;
    /**
     * The key of the source column.
     */
    readonly fromColumnKey: string;
    /**
     * The key of the target column.
     */
    readonly toColumnKey: string;
    /**
     * The original index of the item in the source column.
     */
    readonly fromIndex: number;
    /**
     * The new index of the item in the destination column.
     */
    readonly toIndex: number;
}
/**
 * Event fired when an item has been moved to a different column.
 *
 * @public
 */
export type FlowBoardItemMoveEvent = CustomEvent<IFlowBoardItemMoveEventDetail>;
/**
 * Drag type discriminator.
 *
 * @public
 */
export type FlowBoardDragType = 'column' | 'item';
/**
 * Event detail for drag-start events when dragging a column.
 *
 * @public
 */
export interface IFlowBoardDragStartColumnEventDetail extends IEventDetail {
    /**
     * The type of drag operation.
     */
    readonly type: 'column';
    /**
     * The key of the column being dragged.
     */
    readonly columnKey: string;
}
/**
 * Event detail for drag-start events when dragging an item.
 *
 * @public
 */
export interface IFlowBoardDragStartItemEventDetail extends IEventDetail {
    /**
     * The type of drag operation.
     */
    readonly type: 'item';
    /**
     * The key of the item being dragged.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly fromColumnKey: string;
}
/**
 * Event detail for drag-start events.
 *
 * @public
 */
export type IFlowBoardDragStartEventDetail = IFlowBoardDragStartColumnEventDetail | IFlowBoardDragStartItemEventDetail;
/**
 * Event fired when a drag operation starts.
 *
 * @public
 */
export type FlowBoardDragStartEvent = CustomEvent<IFlowBoardDragStartEventDetail>;
/**
 * Event detail for drag-end events when dragging a column.
 *
 * @public
 */
export interface IFlowBoardDragEndColumnEventDetail extends IEventDetail {
    /**
     * The type of drag operation.
     */
    readonly type: 'column';
    /**
     * The key of the column that was dragged.
     */
    readonly columnKey: string;
    /**
     * Whether the drag operation resulted in a drop.
     */
    readonly dropped: boolean;
}
/**
 * Event detail for drag-end events when dragging an item.
 *
 * @public
 */
export interface IFlowBoardDragEndItemEventDetail extends IEventDetail {
    /**
     * The type of drag operation.
     */
    readonly type: 'item';
    /**
     * The key of the item that was dragged.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly fromColumnKey: string;
    /**
     * Whether the drag operation resulted in a drop.
     */
    readonly dropped: boolean;
}
/**
 * Event detail for drag-end events.
 *
 * @public
 */
export type IFlowBoardDragEndEventDetail = IFlowBoardDragEndColumnEventDetail | IFlowBoardDragEndItemEventDetail;
/**
 * Event fired when a drag operation ends.
 *
 * @public
 */
export type FlowBoardDragEndEvent = CustomEvent<IFlowBoardDragEndEventDetail>;
/**
 * Event detail for before-column-pin-change events.
 *
 * @public
 */
export interface IFlowBoardBeforeColumnPinChangeEventDetail extends ICancelEventDetail {
    /**
     * The key of the column.
     */
    readonly columnKey: string;
    /**
     * The new pinned state.
     */
    readonly pinned: boolean;
}
/**
 * Event fired before a column's pinned state changes.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeColumnPinChangeEvent = CustomEvent<IFlowBoardBeforeColumnPinChangeEventDetail>;
/**
 * Event detail for column-pin-change events.
 *
 * @public
 */
export interface IFlowBoardColumnPinChangeEventDetail extends IEventDetail {
    /**
     * The key of the column.
     */
    readonly columnKey: string;
    /**
     * The new pinned state.
     */
    readonly pinned: boolean;
}
/**
 * Event fired when a column's pinned state has changed.
 *
 * @public
 */
export type FlowBoardColumnPinChangeEvent = CustomEvent<IFlowBoardColumnPinChangeEventDetail>;
/**
 * Event detail for before-item-pin-change events.
 *
 * @public
 */
export interface IFlowBoardBeforeItemPinChangeEventDetail extends ICancelEventDetail {
    /**
     * The key of the item.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly columnKey: string;
    /**
     * The new pinned state.
     */
    readonly pinned: boolean;
}
/**
 * Event fired before an item's pinned state changes.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeItemPinChangeEvent = CustomEvent<IFlowBoardBeforeItemPinChangeEventDetail>;
/**
 * Event detail for item-pin-change events.
 *
 * @public
 */
export interface IFlowBoardItemPinChangeEventDetail extends IEventDetail {
    /**
     * The key of the item.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly columnKey: string;
    /**
     * The new pinned state.
     */
    readonly pinned: boolean;
}
/**
 * Event fired when an item's pinned state has changed.
 *
 * @public
 */
export type FlowBoardItemPinChangeEvent = CustomEvent<IFlowBoardItemPinChangeEventDetail>;
/**
 * Source of add column action.
 *
 * @public
 */
export type FlowBoardAddColumnSource = 'append' | 'keyboard' | 'api';
/**
 * Event detail for before-add-column events.
 *
 * @public
 */
export interface IFlowBoardBeforeAddColumnEventDetail extends ICancelEventDetail {
    /**
     * The source of the add column action.
     */
    readonly source: FlowBoardAddColumnSource;
}
/**
 * Event fired before a column is added.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeAddColumnEvent = CustomEvent<IFlowBoardBeforeAddColumnEventDetail>;
/**
 * Event detail for add-column events.
 *
 * @public
 */
export interface IFlowBoardAddColumnEventDetail extends IEventDetail {
    /**
     * The source of the add column action.
     */
    readonly source: FlowBoardAddColumnSource;
}
/**
 * Event fired when a column has been added.
 *
 * @public
 */
export type FlowBoardAddColumnEvent = CustomEvent<IFlowBoardAddColumnEventDetail>;
/**
 * Event detail for before-item-create events.
 *
 * @public
 */
/**
 * Event detail for before-item-create events.
 * Contains the user-defined data for the item to be created.
 *
 * @public
 */
export interface IFlowBoardBeforeItemCreateEventDetail<TData = unknown> extends ICancelEventDetail {
    /**
     * The key of the column where the item will be created.
     */
    readonly columnKey: string;
    /**
     * The user-defined data for the new item (can include title, description, metadata, custom fields, etc.).
     */
    readonly data: TData;
}
/**
 * Event fired before an item is created.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeItemCreateEvent<TData = unknown> = CustomEvent<IFlowBoardBeforeItemCreateEventDetail<TData>>;
/**
 * Event detail for item-create events.
 *
 * @public
 */
export interface IFlowBoardItemCreateEventDetail<TData = unknown> extends IEventDetail {
    /**
     * The key of the column where the item was created.
     */
    readonly columnKey: string;
    /**
     * The user-defined data for the created item.
     */
    readonly data: TData;
}
/**
 * Event fired when an item has been created.
 *
 * @public
 */
export type FlowBoardItemCreateEvent<TData = unknown> = CustomEvent<IFlowBoardItemCreateEventDetail<TData>>;
/**
 * Trigger for item activation.
 *
 * @public
 */
export type FlowBoardItemActivateTrigger = 'click' | 'keyboard';
/**
 * Event detail for before-item-activate events.
 *
 * @public
 */
export interface IFlowBoardBeforeItemActivateEventDetail extends ICancelEventDetail {
    /**
     * The key of the item being activated.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly columnKey: string;
    /**
     * The trigger for the activation.
     */
    readonly trigger: FlowBoardItemActivateTrigger;
}
/**
 * Event fired before an item is activated.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeItemActivateEvent = CustomEvent<IFlowBoardBeforeItemActivateEventDetail>;
/**
 * Event detail for item-activate events.
 *
 * @public
 */
export interface IFlowBoardItemActivateEventDetail extends IEventDetail {
    /**
     * The key of the item that was activated.
     */
    readonly itemKey: string;
    /**
     * The key of the column containing the item.
     */
    readonly columnKey: string;
    /**
     * The trigger for the activation.
     */
    readonly trigger: FlowBoardItemActivateTrigger;
}
/**
 * Event fired when an item has been activated.
 *
 * @public
 */
export type FlowBoardItemActivateEvent = CustomEvent<IFlowBoardItemActivateEventDetail>;
/**
 * Event detail for before-column-create events.
 *
 * @public
 */
export interface IFlowBoardBeforeColumnCreateEventDetail<TData = unknown> extends ICancelEventDetail {
    /**
     * The data for the new column.
     * Can include element properties, metadata, and any custom fields.
     */
    readonly data: TData;
}
/**
 * Event fired before a column is created via composer.
 * Can be canceled by setting `cancel: true` in the event detail.
 *
 * @public
 */
export type FlowBoardBeforeColumnCreateEvent<TData = unknown> = CustomEvent<IFlowBoardBeforeColumnCreateEventDetail<TData>>;
/**
 * Event detail for column-create events.
 *
 * @public
 */
export interface IFlowBoardColumnCreateEventDetail<TData = unknown> extends IEventDetail {
    /**
     * The data for the new column.
     * Can include element properties, metadata, and any custom fields.
     */
    readonly data: TData;
}
/**
 * Event fired when a column has been created via composer.
 *
 * @public
 */
export type FlowBoardColumnCreateEvent<TData = unknown> = CustomEvent<IFlowBoardColumnCreateEventDetail<TData>>;
declare global {
    interface HTMLElementEventMap {
        flowBoardBeforeColumnReorder: FlowBoardBeforeColumnReorderEvent;
        flowBoardColumnReorder: FlowBoardColumnReorderEvent;
        flowBoardBeforeItemReorder: FlowBoardBeforeItemReorderEvent;
        flowBoardItemReorder: FlowBoardItemReorderEvent;
        flowBoardBeforeItemMove: FlowBoardBeforeItemMoveEvent;
        flowBoardItemMove: FlowBoardItemMoveEvent;
        flowBoardDragStart: FlowBoardDragStartEvent;
        flowBoardDragEnd: FlowBoardDragEndEvent;
        flowBoardBeforeColumnPinChange: FlowBoardBeforeColumnPinChangeEvent;
        flowBoardColumnPinChange: FlowBoardColumnPinChangeEvent;
        flowBoardBeforeItemPinChange: FlowBoardBeforeItemPinChangeEvent;
        flowBoardItemPinChange: FlowBoardItemPinChangeEvent;
        flowBoardBeforeAddColumn: FlowBoardBeforeAddColumnEvent;
        flowBoardAddColumn: FlowBoardAddColumnEvent;
        flowBoardBeforeItemCreate: FlowBoardBeforeItemCreateEvent;
        flowBoardItemCreate: FlowBoardItemCreateEvent;
        flowBoardBeforeItemActivate: FlowBoardBeforeItemActivateEvent;
        flowBoardItemActivate: FlowBoardItemActivateEvent;
        flowBoardBeforeColumnCreate: FlowBoardBeforeColumnCreateEvent;
        flowBoardColumnCreate: FlowBoardColumnCreateEvent;
    }
}
//# sourceMappingURL=FlowBoardEvents.d.ts.map