import React from "react";
import { RoomLabel } from "./room-label";
import { roomsMock } from "../../mocks";
import { RoomListContainer, RoomAddSection, StyledAnnotation, PlusButton, } from "./styled";
const mockedWorkspace = {};
export const SpaceRooms = () => {
    const workspace = mockedWorkspace;
    const rooms = roomsMock;
    const userIsAdmin = true;
    const isAllowedToCreateRooms = !workspace.createRoomAdminsOnly || userIsAdmin;
    const handleAddRoom = (e) => {
        e.preventDefault();
        // navigate to room creation?, which is not a route in Cloud SPA (TODO make it so)
    };
    return (React.createElement(React.Fragment, null,
        isAllowedToCreateRooms && (React.createElement(RoomAddSection, null,
            React.createElement(StyledAnnotation, null, "Rooms"),
            React.createElement(PlusButton, { icon: "plus", onClick: handleAddRoom }))),
        React.createElement(RoomListContainer, null, rooms.map((room) => (React.createElement(RoomLabel, { key: room.id, room: room }))))));
};
//# sourceMappingURL=space-rooms.js.map