{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "disaster-response-map",
  "title": "Disaster Response Map",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/disaster-response-map/DisasterResponseMap.vue",
      "content": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Map, MapMarker, MapSource, MapLayer, type MapRef } from '@/components/ui/map'\nimport { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\n\ndefineProps<{ accessToken?: string }>()\n\ninterface Shelter {\n  id: string\n  name: string\n  type: 'Shelter' | 'Medical Staging' | 'Command Post'\n  coords: [number, number]\n  capacity: number\n  occupied: number\n  status: 'Open' | 'Near Capacity' | 'Closed'\n}\n\nconst mapRef = ref<MapRef | null>(null)\n\n// Simulated wildfire hazard perimeter coordinates (near Boulder, CO)\nconst firePerimeterCoords: [number, number][] = [\n  [-105.32, 40.01],\n  [-105.29, 40.03],\n  [-105.26, 40.02],\n  [-105.25, 39.99],\n  [-105.28, 39.97],\n  [-105.31, 39.98],\n  [-105.32, 40.01],\n]\n\nconst facilities: Shelter[] = [\n  {\n    id: 's-1',\n    name: 'County Event Center Shelter',\n    type: 'Shelter',\n    coords: [-105.24, 40.04],\n    capacity: 500,\n    occupied: 340,\n    status: 'Open',\n  },\n  {\n    id: 's-2',\n    name: 'West Valley Medical Staging',\n    type: 'Medical Staging',\n    coords: [-105.22, 39.98],\n    capacity: 120,\n    occupied: 98,\n    status: 'Near Capacity',\n  },\n  {\n    id: 's-3',\n    name: 'Unified Incident Command Post',\n    type: 'Command Post',\n    coords: [-105.25, 40.07],\n    capacity: 80,\n    occupied: 45,\n    status: 'Open',\n  },\n]\n\nconst activeFacility = ref<Shelter>(facilities[0])\n\nfunction focusFacility(f: Shelter) {\n  activeFacility.value = f\n  mapRef.value?.flyTo({ center: f.coords, zoom: 12.5 })\n}\n\nfunction focusHazard() {\n  mapRef.value?.flyTo({ center: [-105.28, 40.0], zoom: 11.5 })\n}\n</script>\n\n<template>\n  <div class=\"grid gap-4 lg:grid-cols-[1fr_320px]\">\n    <div class=\"border-border bg-card relative h-[480px] overflow-hidden rounded-xl border\">\n      <Map\n        ref=\"mapRef\"\n        :access-token=\"accessToken\"\n        variant=\"light\"\n        :center=\"[-105.27, 40.01]\"\n        :zoom=\"11.2\"\n        class=\"h-full w-full\"\n      >\n        <!-- Wildfire Hazard Exclusion Zone -->\n        <MapSource\n          id=\"hazard-zone\"\n          :options=\"{\n            type: 'geojson',\n            data: {\n              type: 'Feature',\n              properties: {},\n              geometry: { type: 'Polygon', coordinates: [firePerimeterCoords] },\n            },\n          }\"\n        />\n        <MapLayer\n          id=\"hazard-zone-fill\"\n          :options=\"{\n            type: 'fill',\n            source: 'hazard-zone',\n            paint: { 'fill-color': '#ef4444', 'fill-opacity': 0.28 },\n          }\"\n        />\n        <MapLayer\n          id=\"hazard-zone-line\"\n          :options=\"{\n            type: 'line',\n            source: 'hazard-zone',\n            paint: { 'line-color': '#dc2626', 'line-width': 2.5, 'line-dasharray': [2, 1] },\n          }\"\n        />\n\n        <!-- Active Fire Origin Marker -->\n        <MapMarker :lng-lat=\"[-105.29, 40.0]\" anchor=\"center\" @click=\"focusHazard\">\n          <div class=\"relative flex cursor-pointer items-center justify-center\">\n            <span class=\"bg-destructive/30 absolute size-9 animate-ping rounded-full\" />\n            <div\n              class=\"bg-destructive flex size-7 items-center justify-center rounded-full font-mono text-xs font-bold text-white shadow-lg ring-2 ring-white\"\n            >\n              🔥\n            </div>\n          </div>\n        </MapMarker>\n\n        <!-- Shelters and Medical Staging -->\n        <MapMarker v-for=\"f in facilities\" :key=\"f.id\" :lng-lat=\"f.coords\" anchor=\"bottom\" @click=\"focusFacility(f)\">\n          <div class=\"group flex cursor-pointer flex-col items-center\">\n            <div\n              class=\"flex size-7 items-center justify-center rounded-full shadow-md ring-2\"\n              :class=\"\n                f.type === 'Shelter'\n                  ? 'bg-success text-white ring-emerald-400/40'\n                  : f.type === 'Medical Staging'\n                    ? 'bg-info text-white ring-blue-400/40'\n                    : 'bg-primary text-primary-foreground ring-primary/40'\n              \"\n            >\n              {{ f.type === 'Shelter' ? '🏠' : f.type === 'Medical Staging' ? '✚' : '★' }}\n            </div>\n            <span\n              class=\"border-border bg-background/90 mt-1 rounded border px-1 py-0.5 font-mono text-xs font-bold whitespace-nowrap shadow-xs\"\n            >\n              {{ f.name.split(' ')[0] }}\n            </span>\n          </div>\n        </MapMarker>\n      </Map>\n    </div>\n\n    <!-- Incident Control Dashboard -->\n    <Card class=\"flex flex-col justify-between\">\n      <CardHeader>\n        <div class=\"flex items-center justify-between\">\n          <Badge variant=\"outline\" class=\"border-destructive/30 bg-destructive/10 text-destructive font-mono text-xs\"\n            >LEVEL 3 EVACUATION</Badge\n          >\n          <Badge class=\"border-success/20 bg-success/10 text-success\">{{ activeFacility.status }}</Badge>\n        </div>\n        <CardTitle class=\"mt-2 text-lg\">{{ activeFacility.name }}</CardTitle>\n        <CardDescription class=\"text-xs\"\n          >Capacity: {{ activeFacility.occupied }} / {{ activeFacility.capacity }} beds occupied</CardDescription\n        >\n      </CardHeader>\n      <CardContent class=\"space-y-4\">\n        <!-- Capacity Bar -->\n        <div class=\"border-border space-y-1.5 border-t pt-3\">\n          <div class=\"flex items-center justify-between font-mono text-xs\">\n            <span class=\"text-muted-foreground\">Occupancy Rate</span>\n            <span class=\"text-foreground font-bold\"\n              >{{ Math.round((activeFacility.occupied / activeFacility.capacity) * 100) }}%</span\n            >\n          </div>\n          <div class=\"bg-muted h-2 w-full overflow-hidden rounded-full\">\n            <div\n              class=\"h-full rounded-full transition-[width,background-color]\"\n              :class=\"activeFacility.occupied / activeFacility.capacity > 0.8 ? 'bg-warning' : 'bg-success'\"\n              :style=\"{ width: `${(activeFacility.occupied / activeFacility.capacity) * 100}%` }\"\n            />\n          </div>\n        </div>\n\n        <div class=\"border-border space-y-1 border-t pt-3\">\n          <div class=\"text-muted-foreground mb-1 font-mono text-xs tracking-wider uppercase\">Staged Relief Sites</div>\n          <button\n            v-for=\"f in facilities\"\n            :key=\"f.id\"\n            type=\"button\"\n            class=\"flex w-full items-center justify-between rounded-md px-2 py-1 text-xs transition-colors\"\n            :class=\"\n              activeFacility.id === f.id\n                ? 'bg-accent text-accent-foreground font-semibold'\n                : 'hover:bg-muted text-muted-foreground'\n            \"\n            @click=\"focusFacility(f)\"\n          >\n            <span class=\"max-w-[170px] truncate\">{{ f.name }}</span>\n            <span class=\"font-mono text-xs opacity-75\">{{ f.occupied }}/{{ f.capacity }}</span>\n          </button>\n        </div>\n\n        <div class=\"flex gap-2 pt-2\">\n          <Button variant=\"outline\" size=\"sm\" class=\"flex-1 font-mono text-xs\" @click=\"focusHazard\">\n            Exclusion Zone\n          </Button>\n          <Button variant=\"outline\" size=\"sm\" class=\"flex-1 font-mono text-xs\" @click=\"focusFacility(activeFacility)\">\n            Focus Site\n          </Button>\n        </div>\n      </CardContent>\n    </Card>\n  </div>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/DisasterResponseMap.vue"
    }
  ],
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/card.json",
    "https://uipkge.dev/r/vue/map.json"
  ],
  "description": "Incident management map with wildfire hazard perimeter, shelter capacities, and emergency staging points.",
  "categories": [
    "logistics",
    "emergency",
    "map"
  ]
}