import React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import { BreakoutParticipant, Participant, ShowAlert } from '../../@types/types'; import { Socket } from 'socket.io-client'; /** * Parameters that power the breakout room management workflow within `BreakoutRoomsModal`. * * @interface BreakoutRoomsModalParameters * * **Participants & Rooms:** * @property {Participant[]} participants Full participant roster. * @property {BreakoutParticipant[][]} breakoutRooms Current room assignments. * @property {number | null} currentRoomIndex Index of the room in focus. * * **Session Context:** * @property {string} roomName Active room identifier. * @property {Socket} socket Primary socket connection. * @property {Socket} [localSocket] Optional local socket for mirrored events. * @property {ShowAlert} [showAlert] Alert helper for UI feedback. * * **Display State:** * @property {string} meetingDisplayType Current display mode. * @property {string} prevMeetingDisplayType Previous display mode before breakout. * @property {boolean} shareScreenStarted Whether screen share is active. * @property {boolean} shared Indicates shared content state. * @property {boolean} breakOutRoomStarted Flag when breakout is active. * @property {boolean} breakOutRoomEnded Flag when breakout has ended. * @property {boolean} isBreakoutRoomsModalVisible Whether modal is visible. * @property {boolean} canStartBreakout Whether start button should be enabled. * * **Limits & Utilities:** * @property {number} itemPageLimit Maximum participants per room. * @property {() => BreakoutRoomsModalParameters} getUpdatedAllParams Helper returning refreshed parameters. * * **State Updaters:** * @property {(started: boolean) => void} updateBreakOutRoomStarted Setter for breakout start flag. * @property {(ended: boolean) => void} updateBreakOutRoomEnded Setter for breakout end flag. * @property {(roomIndex: number) => void} updateCurrentRoomIndex Setter for current room index. * @property {(canStart: boolean) => void} updateCanStartBreakout Controls breakout eligibility. * @property {(breakoutRooms: BreakoutParticipant[][]) => void} updateBreakoutRooms Persists room assignments. * @property {(displayType: string) => void} updateMeetingDisplayType Updates meeting display type. * * @property {[key: string]: any} [key:string] Additional dynamic parameters forwarded internally. */ export interface BreakoutRoomsModalParameters { participants: Participant[]; showAlert?: ShowAlert; socket: Socket; localSocket?: Socket; itemPageLimit: number; meetingDisplayType: string; prevMeetingDisplayType: string; roomName: string; shareScreenStarted: boolean; shared: boolean; breakOutRoomStarted: boolean; breakOutRoomEnded: boolean; isBreakoutRoomsModalVisible: boolean; currentRoomIndex: number | null; canStartBreakout: boolean; breakoutRooms: BreakoutParticipant[][]; updateBreakOutRoomStarted: (started: boolean) => void; updateBreakOutRoomEnded: (ended: boolean) => void; updateCurrentRoomIndex: (roomIndex: number) => void; updateCanStartBreakout: (canStart: boolean) => void; updateBreakoutRooms: (breakoutRooms: BreakoutParticipant[][]) => void; updateMeetingDisplayType: (displayType: string) => void; getUpdatedAllParams: () => BreakoutRoomsModalParameters; [key: string]: any; } /** * Options for rendering the `BreakoutRoomsModal` component. * * @interface BreakoutRoomsModalOptions * * **Modal Control:** * @property {boolean} isVisible Determines visibility state. * @property {() => void} onBreakoutRoomsClose Invoked when the modal should close. * * **Parameters:** * @property {BreakoutRoomsModalParameters} parameters Parameter bundle containing breakout state and setters. * * **Appearance:** * @property {'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft'} [position='topRight'] Anchor position on screen. * @property {string} [backgroundColor='#83c0e9'] Background color. * @property {StyleProp} [style] Additional styling for the modal container. * * **Advanced Render Overrides:** * @property {(options: { defaultContent: JSX.Element; dimensions: { width: number; height: number } }) => JSX.Element} [renderContent] * Override for the inner layout. * @property {(options: { defaultContainer: JSX.Element; dimensions: { width: number; height: number } }) => JSX.Element} [renderContainer] * Override for the outer container implementation. */ export interface BreakoutRoomsModalOptions { isVisible: boolean; onBreakoutRoomsClose: () => void; parameters: BreakoutRoomsModalParameters; position?: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft'; backgroundColor?: string; style?: StyleProp; renderContent?: (options: { defaultContent: JSX.Element; dimensions: { width: number; height: number; }; }) => JSX.Element; renderContainer?: (options: { defaultContainer: JSX.Element; dimensions: { width: number; height: number; }; }) => JSX.Element; } export type BreakoutRoomsModalType = (options: BreakoutRoomsModalOptions) => JSX.Element; /** * BreakoutRoomsModal orchestrates the lifecycle of breakout rooms: creation, participant assignment, * and coordination of start/stop events. It surfaces helpers for random/manual assignment, exposes * socket context, and supports advanced customization through render overrides. * * ### Key Features * - Random and manual room assignment with per-room validation. * - Editing experience via nested modal for participant allocation. * - Keeps track of breakout state flags (`canStartBreakout`, `breakOutRoomStarted`, etc.). * - Provides override hooks and theming support for bespoke UI. * * ### Accessibility * - Buttons and controls include descriptive icons and labels. * - Scroll views ensure large rosters remain navigable. * * @param {BreakoutRoomsModalOptions} props Modal configuration and breakout parameters. * @returns {JSX.Element} Rendered breakout manager modal. * * @example Basic usage aligned to default styling. * ```tsx * * ``` * * @example Custom container for glassmorphism effect. * ```tsx * ( * {defaultContainer} * )} * /> * ``` */ declare const BreakoutRoomsModal: React.FC; export default BreakoutRoomsModal;