import * as G from 'geojson';

// Custom GeoJSON style for the building
export const buildingSytle = {
  color: '#d62305', // Red border
  weight: 2, // Border width
  fillColor: '#d4caca', // Red fill
  fillOpacity: 1, // Semi-transparent fill
};

// Example GeoJSON data
export const examplePolygon: G.Polygon = {
  type: 'Polygon',
  coordinates: [
    [
      [8.3897067, 49.0149349], // Southwest corner
      [8.3904111, 49.0149078], // Southeast corner
      [8.3904345, 49.0151542], // Northeast corner
      [8.3897302, 49.0151832], // Northwest corner
      [8.3897067, 49.0149349], // Closing the polygon by repeating the first point
    ],
  ],
};

export const buildings: G.FeatureCollection = {
  type: 'FeatureCollection',
  features: [
    {
      type: 'Feature',
      properties: {
        name: 'E',
        building: 'university',
      },
      geometry: {
        type: 'Polygon',
        coordinates: [
          [
            [8.3897067, 49.0149349], // Southwest corner
            [8.3904111, 49.0149078], // Southeast corner
            [8.3904345, 49.0151542], // Northeast corner
            [8.3897302, 49.0151832], // Northwest corner
            [8.3897067, 49.0149349], // Closing the polygon by repeating the first point
          ],
        ],
      },
    },
    {
      type: 'Feature',
      properties: {
        name: 'F',
        building: 'university',
      },
      geometry: {
        type: 'Polygon',
        coordinates: [
          [
            [8.3897585, 49.015502], // Southwest corner
            [8.3904592, 49.0154731], // Southeast corner
            [8.3904833, 49.0157255], // Northeast corner
            [8.3897827, 49.0157543], // Northwest corner
            [8.3897585, 49.015502], // Closing the polygon by repeating the first point
          ],
        ],
      },
    },
  ],
};
