Index: imaps-frontend/src/components/EntranceModal/EntranceModal.jsx
===================================================================
--- imaps-frontend/src/components/EntranceModal/EntranceModal.jsx	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/src/components/EntranceModal/EntranceModal.jsx	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
@@ -0,0 +1,248 @@
+import React, { useState, useEffect } from "react";
+import styles from "./EntranceModal.module.css";
+
+export default function EntranceModal(props) {
+  const [modal, setModal] = useState(false);
+  const [room, setRoom] = useState(null);
+  const [pins, setPins] = useState([]);
+
+  const [formData, setFormData] = useState({
+    name: "",
+    connectedRoom: "",
+    description: "",
+    availableRooms: [],
+    availablePins: [],
+    selectedPins: [],
+    isMainEntrance: false,
+    selectedPin: "",
+  });
+
+  const toggleModal = () => {
+    if (modal) {
+      room.info = formData;
+      props.map.updateRoomNames();
+      console.log("Se vikna");
+    }
+    setModal(!modal);
+  };
+
+  const handleInputChange = (e) => {
+    const { name, value, type, checked } = e.target;
+    setFormData((prevData) => ({
+      ...prevData,
+      [name]: type === "checkbox" ? checked : value,
+    }));
+
+    console.log(formData);
+  };
+
+  const addPinToList = () => {
+    if (!formData.selectedPin || pins.includes(formData.selectedPin)) return;
+
+    setPins((prevPins) => {
+      const updatedPins = [...prevPins, formData.selectedPin];
+
+      setFormData((prevFormData) => ({
+        ...prevFormData,
+        selectedPin: "",
+        selectedPins: updatedPins,
+      }));
+
+      return updatedPins;
+    });
+  };
+
+  const removePinFromList = (pinToRemove) => {
+    setPins((prevPins) => {
+      const updatedPins = prevPins.filter((pin) => pin !== pinToRemove);
+      setFormData((prevFormData) => ({
+        ...prevFormData,
+        selectedPins: updatedPins,
+      }));
+      return updatedPins;
+    });
+    props.map.removeConnection(formData.name, pinToRemove);
+  };
+
+  const saveDetails = () => {
+    if (room) {
+      room.info = formData;
+      toggleModal();
+    }
+  };
+
+  useEffect(() => {
+    const openModalHandler = (event) => {
+      const roomObj = event.detail.room;
+      setRoom(roomObj);
+
+      const savedPins = roomObj.info.selectedPins || [];
+
+      setFormData({
+        name: roomObj.info.name || "",
+        connectedRoom: roomObj.info.connectedRoom || "",
+        description: roomObj.info.description || "",
+        availablePins: event.detail.map.getConnections() || [],
+        availableRooms: event.detail.map.getRooms() || [],
+        isMainEntrance: roomObj.info.isMainEntrance || false,
+        selectedPin: "",
+        selectedPins: savedPins,
+      });
+
+      setPins(savedPins);
+      setModal(true);
+      event.detail.map.updateConnections();
+
+      console.log(savedPins, "Loaded pins on modal open");
+    };
+
+    window.addEventListener("openEntranceModalEvent", openModalHandler);
+
+    return () => {
+      window.removeEventListener("openEntranceModalEvent", openModalHandler);
+    };
+  }, []);
+
+  if (modal) {
+    document.body.classList.add(styles.activeModal);
+  } else {
+    document.body.classList.remove(styles.activeModal);
+  }
+
+  return (
+    <>
+      {/* <button onClick={toggleModal} className={styles.btnModal}>
+        Entrance Modal
+      </button> */}
+
+      {modal && (
+        <div className={styles.modal}>
+          <div onClick={toggleModal} className={styles.overlay}></div>
+          <div className={styles.modalContent}>
+            <h2>Enter Entrance Details</h2>
+            <form className={styles.form}>
+              {/* Entrance Name */}
+              <div className={styles.formGroup}>
+                <label htmlFor="name">Name:</label>
+                <input
+                  type="text"
+                  id="name"
+                  name="name"
+                  value={formData.name}
+                  onChange={handleInputChange}
+                  placeholder="Enter the entrance name" // Suggest user input
+                  required
+                />
+              </div>
+
+              {/* Select Room for Entrance */}
+              <div className={styles.formGroup}>
+                <label htmlFor="connectedRoom">Select room associated with entrance:</label>
+                <select
+                  id="connectedRoom"
+                  name="connectedRoom"
+                  value={formData.connectedRoom}
+                  onChange={handleInputChange}
+                  required
+                >
+                  <option value="">Select Room</option>
+                  {formData.availableRooms.map((room, index) => (
+                    <option key={index} value={room.name}>
+                      {room.name}
+                    </option>
+                  ))}
+                </select>
+              </div>
+
+              {/* Pins Dropdown for Hallway Navigation */}
+              <div className={styles.formGroup}>
+                <label htmlFor="selectedPin">Select connections:</label>
+                <select
+                  id="selectedPin"
+                  name="selectedPin"
+                  value={formData.selectedPin}
+                  onChange={handleInputChange}
+                  required
+                >
+                  <option value="">Select Connection</option>
+                  {formData.availablePins
+                    .filter(
+                      (pin) =>
+                        formData.selectedPins.includes(pin.name) === false &&
+                        pin.name !== "" &&
+                        pin.name !== formData.name
+                    )
+                    .map((pin, index) => (
+                      <option key={index} value={pin.name}>
+                        {pin.name}
+                      </option>
+                    ))}
+                </select>
+                <button type="button" onClick={addPinToList} className={styles.addButton}>
+                  Add Connection
+                </button>
+              </div>
+
+              {/* Display added pins */}
+              <h3>Connections:</h3>
+              <ul className={styles.pinList}>
+                {pins.length > 0 ? (
+                  pins.map((pin, index) => (
+                    <li key={index} className={styles.pinItem}>
+                      {pin}
+                      <button onClick={() => removePinFromList(pin)} className={styles.removeButton}>
+                        Remove
+                      </button>
+                    </li>
+                  ))
+                ) : (
+                  <li>No connections added</li>
+                )}
+              </ul>
+              <br />
+
+              {/* Description */}
+              <div className={styles.formGroup}>
+                <label htmlFor="description">Description:</label>
+                <textarea
+                  id="description"
+                  name="description"
+                  value={formData.description}
+                  onChange={handleInputChange}
+                  rows="3"
+                />
+              </div>
+
+              {/* Main Entrance Checkbox */}
+              <div className={styles.formGroupCheckbox}>
+                <input
+                  type="checkbox"
+                  id="isMainEntrance"
+                  name="isMainEntrance"
+                  checked={formData.isMainEntrance}
+                  onChange={handleInputChange}
+                />
+                <label htmlFor="isMainEntrance">Is Main Entrance?</label>
+              </div>
+
+              {/* Save Button */}
+              <div className={styles.formGroup}>
+                <button
+                  type="button"
+                  id="submit-details"
+                  onClick={saveDetails}
+                  className={styles.submitButton}
+                >
+                  Save
+                </button>
+              </div>
+            </form>
+            <button className={styles.closeModal} onClick={toggleModal}>
+              CLOSE
+            </button>
+          </div>
+        </div>
+      )}
+    </>
+  );
+}
Index: imaps-frontend/src/components/EntranceModal/EntranceModal.module.css
===================================================================
--- imaps-frontend/src/components/EntranceModal/EntranceModal.module.css	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
+++ imaps-frontend/src/components/EntranceModal/EntranceModal.module.css	(revision d56544918790c0c3bc50f2f0a98c99f3d2988ccf)
@@ -0,0 +1,183 @@
+/* Active modal: Disable scrolling when the modal is open */
+.activeModal {
+  overflow-y: hidden; /* Disable scrolling */
+}
+
+/* Modal and overlay styles */
+.modal,
+.overlay {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 100vh;
+}
+
+/* Overlay: Dark background with optional blur */
+.overlay {
+  background: rgba(0, 0, 0, 0.7); /* Darken the background */
+  backdrop-filter: blur(5px); /* Optional blur effect */
+  z-index: 999; /* Ensure the overlay appears below the modal */
+}
+
+/* Modal content: Centered and styled */
+.modalContent {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background-color: #2c2f33; /* Darker background for modal content */
+  color: #ffffff; /* White text for contrast */
+  padding: 20px;
+  border-radius: 8px;
+  max-width: 600px;
+  width: 100%;
+  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
+  z-index: 1000; /* Ensure the modal appears above the overlay */
+}
+
+/* Heading styles */
+h2,
+h3 {
+  margin-bottom: 15px;
+  color: #ffffff; /* White text for the headings */
+}
+
+/* Button for opening the modal */
+.btnModal {
+  padding: 10px 20px;
+  font-size: 18px;
+  background-color: #007bff;
+  color: white;
+  border: none;
+  border-radius: 5px;
+  cursor: pointer;
+  margin: 20px;
+  display: block;
+}
+
+.btnModal:hover {
+  background-color: #0056b3;
+}
+
+/* Close button inside the modal */
+.closeModal {
+  position: absolute;
+  top: 10px;
+  right: 10px;
+  padding: 5px 10px;
+  background-color: #dc3545;
+  color: white;
+  border: none;
+  border-radius: 5px;
+  cursor: pointer;
+}
+
+.closeModal:hover {
+  background-color: #c82333;
+}
+
+/* Form styles */
+.form {
+  display: flex;
+  flex-direction: column;
+}
+
+.formGroup {
+  margin-bottom: 15px;
+}
+
+/* Form labels */
+.formGroup label {
+  display: block;
+  margin-bottom: 5px;
+  color: #ffffff; /* White text for labels */
+}
+
+/* Input, select, and textarea styles */
+.formGroup input,
+.formGroup select,
+.formGroup textarea {
+  width: 100%;
+  padding: 8px;
+  border-radius: 4px;
+  border: 1px solid #ccc;
+  background-color: #23272a; /* Darker input background */
+  color: #ffffff; /* White text inside the input fields */
+}
+
+.formGroup input::placeholder,
+.formGroup textarea::placeholder {
+  color: #888888; /* Slightly lighter color for placeholder text */
+}
+
+/* Checkbox alignment fix */
+.formGroupCheckbox {
+  display: flex;
+  align-items: center; /* Vertical alignment */
+  color: #ffffff;
+}
+
+/* Add button */
+.addButton {
+  background-color: #28a745;
+  color: white;
+  padding: 8px 15px;
+  border: none;
+  border-radius: 5px;
+  cursor: pointer;
+  margin-top: 10px;
+}
+
+.addButton:hover {
+  background-color: #218838;
+}
+
+/* Save button styling */
+.submitButton {
+  background-color: #28a745;
+  color: white;
+  padding: 10px 20px;
+  border: none;
+  border-radius: 5px;
+  cursor: pointer;
+  font-size: 16px;
+  margin-top: 15px;
+}
+
+.submitButton:hover {
+  background-color: #218838;
+}
+
+/* Pin list */
+.pinList {
+  list-style-type: none;
+  padding: 0;
+  margin-top: 15px;
+}
+
+/* Individual pin item */
+.pinItem {
+  background-color: #444;
+  padding: 8px;
+  margin-bottom: 5px;
+  color: white;
+  border-radius: 5px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+/* Remove button */
+.removeButton {
+  background-color: #dc3545;
+  color: white;
+  border: none;
+  padding: 5px 10px;
+  border-radius: 5px;
+  cursor: pointer;
+}
+
+.removeButton:hover {
+  background-color: #c82333;
+}
