From 12ecc97b07093f3cac6567c70ff75d57b429c674 Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero <ariel@costas.dev>
Date: Tue, 21 Oct 2025 17:38:01 +0200
Subject: Implement new Santiago region (WIP)

---
 src/frontend/app/components/RegionSelector.tsx | 33 ++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 src/frontend/app/components/RegionSelector.tsx

(limited to 'src/frontend/app/components/RegionSelector.tsx')

diff --git a/src/frontend/app/components/RegionSelector.tsx b/src/frontend/app/components/RegionSelector.tsx
new file mode 100644
index 0000000..6c9fe8b
--- /dev/null
+++ b/src/frontend/app/components/RegionSelector.tsx
@@ -0,0 +1,33 @@
+import { useApp } from "../AppContext";
+import { getAvailableRegions } from "../data/RegionConfig";
+import "./RegionSelector.css";
+
+export function RegionSelector() {
+  const { region, setRegion } = useApp();
+  const regions = getAvailableRegions();
+
+  const handleRegionChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
+    const newRegion = e.target.value as any;
+    setRegion(newRegion);
+  };
+
+  return (
+    <div className="region-selector">
+      <label htmlFor="region-select" className="region-label">
+        Región:
+      </label>
+      <select
+        id="region-select"
+        className="region-select"
+        value={region}
+        onChange={handleRegionChange}
+      >
+        {regions.map((r) => (
+          <option key={r.id} value={r.id}>
+            {r.name}
+          </option>
+        ))}
+      </select>
+    </div>
+  );
+}
-- 
cgit v1.3

