views.style.geolocation_source:
  type: views_style
  label: 'Geolocation Source'
  mapping:
    data_provider_id:
      type: string
      label: 'Data provider ID'
    data_provider_settings:
      type: geolocation.data_provider.[%parent.data_provider_id]
      label: 'Data provider settings'
    geolocation_field:
      type: string
      label: 'Geolocation Field'
    title_field:
      type: string
      label: 'Title Field'
    label_field:
      type: string
      label: 'Label Field'
    icon_field:
      type: string
      label: 'Icon Field'
    marker_row_number:
      type: integer
      label: 'Use row number as marker label'
    marker_icon_path:
      type: string
      label: 'Path to marker icon'

views.style.geolocation_layer:
  type: views.style.geolocation_source
  label: 'Geolocation Layer'

views.style.maps_common:
  type: views.style.geolocation_source
  label: 'Geolocation CommonMap'
  mapping:
    even_empty:
      type: integer
      label: 'Even empty'
    show_raw_locations:
      type: integer
      label: 'Show raw locations'
    id_field:
      type: string
      label: 'ID field'
    dynamic_map:
      type: mapping
      label: 'Dynamic map settings'
      mapping:
        enabled:
          type: integer
          label: 'Dynamic content refresh'
        hide_form:
          type: integer
          label: 'Hide form'
        views_refresh_delay:
          type: string
          label: 'Views fresh delay in ms'
        update_handler:
          type: string
          label: 'Filter or argument name'
        update_target:
          type: string
          label: 'Display to update'
    centre:
      type: sequence
      label: 'Center option settings'
      sequence:
        type: plugin.plugin_configuration.geolocation.map_center_option.[%key]
        label: 'The settings for a map center option'
    map_provider_id:
      type: string
      label: 'Map provider ID'
    map_provider_settings:
      type: geolocation.map_provider.[%parent.map_provider_id]
      label: 'Map provider settings'

views.field.geolocation_field:
  type: views.field.field
  label: 'Geolocation Field'

views.field.geolocation_field_proximity:
  type: views.field.numeric
  label: 'Geolocation Proximity Field'
  mapping:
    display_unit:
      type: string
      label: 'Distance'
    center:
      type: sequence
      label: 'Location input settings'
      sequence:
        type: plugin.plugin_configuration.geolocation.location.[location_plugin_id]

views.field.geolocation_field_proximity_form:
  type: views.field.geolocation_field_proximity
  label: 'Geolocation Proximity Form Field'
  mapping:
    center:
      type: sequence
      label: 'Location input settings'
      sequence:
        type: plugin.plugin_configuration.geolocation.location_input.[location_input_id]

views.filter.geolocation_filter_boundary:
  type: views_filter
  label: 'Geolocation Boundary Filter'
  mapping:
    value:
      type: mapping
      label: 'Value'
      mapping:
        lat_north_east:
          type: string
          label: 'North East Latitude'
        lng_north_east:
           type: string
           label: 'North East Longitude'
        lat_south_west:
           type: string
           label: 'South West Latitude'
        lng_south_west:
           type: string
           label: 'North East Longitude'
    expose:
      type: mapping
      label: 'Expose settings'
      mapping:
        input_by_geocoding_widget:
          type: integer
          label: 'Enable geocoding widget'
        geocoder_plugin_settings:
          type: mapping
          label: 'Geocoding widget settings'
          mapping:
            plugin_id:
              type: string
              label: 'Geolocation geocoding widget'
            settings:
              type: geolocation.geocoder.[%parent.plugin_id]

views.filter_value.geolocation_filter_proximity:
  type: views.filter_value.numeric
  label: 'Group by Distance'
  mapping:
    center:
      type: mapping
      mapping:
        coordinates:
          type: geolocation.element.input
        geocoder:
          type: mapping
          label: 'This should be defined by the plugin, but I dont know how'
          mapping:
            geolocation_geocoder_address:
              type: string

views.filter.geolocation_filter_proximity:
  type: views.filter.numeric
  label: 'Geolocation Proximity Filter'
  mapping:
    unit:
      type: string
      label: 'Distance'
    location_input:
      type: sequence
      label: 'Location input settings'
      sequence:
        type: plugin.plugin_configuration.geolocation.location_input.[location_input_id]
    value:
      type: views.filter_value.geolocation_filter_proximity
      label: 'Proximity Value'

views.filter.group_item.geolocation_filter_proximity:
  type: views_filter_group_item
  mapping:
    value:
      type: views.filter_value.numeric

views.sort.geolocation_sort_proximity:
  type: views_sort
  label: 'Geolocation Proximity Sort'

views.argument.geolocation_argument_proximity:
  type: views_argument
  label: 'Geolocation Proximity Argument'

views.argument.geolocation_entity_argument:
  type: views_argument
  label: 'Geolocation Entity Argument'
  mapping:
    geolocation_entity_argument_source:
      type: string

views.argument.geolocation_argument_boundary:
  type: views_argument
  label: 'Geolocation Boundary Argument'
