interface RequestsModalOptions {
    isRequestsModalVisible: boolean;
    onRequestClose: (() => void);
    requestCounter: number;
    onRequestFilterChange: ((text: string) => void);
    onRequestItemPress?: RespondToRequestsType;
    requestList: Request[];
    updateRequestList: ((newRequestList: Request[]) => void);
    roomName: string;
    socket: Socket<DefaultEventsMap, DefaultEventsMap>;
    renderRequestComponent?: FC<RenderRequestComponentOptions>;
    backgroundColor?: string;
    position?:
        | "center"
        | "topLeft"
        | "topRight"
        | "bottomLeft"
        | "bottomRight";
    parameters: RequestsModalParameters;
}

Properties

isRequestsModalVisible: boolean

Flag to control the visibility of the modal.

onRequestClose: (() => void)

Callback function to handle the closing of the modal.

requestCounter: number

Initial count of requests.

onRequestFilterChange: ((text: string) => void)

Function to handle the filter input changes.

onRequestItemPress?: RespondToRequestsType

Function to handle the action when a request item is pressed.

requestList: Request[]

List of requests.

updateRequestList: ((newRequestList: Request[]) => void)

Function to update the request list.

roomName: string

Name of the room.

socket: Socket<DefaultEventsMap, DefaultEventsMap>

Socket instance for real-time communication.

renderRequestComponent?: FC<RenderRequestComponentOptions>

Component to render each request item. Defaults to RenderRequestComponent.

backgroundColor?: string

Background color of the modal. Defaults to '#83c0e9'.

position?:
    | "center"
    | "topLeft"
    | "topRight"
    | "bottomLeft"
    | "bottomRight"

Position of the modal on the screen. Possible values: 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'center'. Defaults to 'topRight'.

Additional parameters for the modal.