package org.github.tess1o.geopulse.user.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.github.tess1o.geopulse.shared.map.MapRenderMode;

/**
 * Timeline display preferences - settings that affect ONLY how timelines are rendered in the UI.
 * These settings do NOT affect timeline generation and changing them does NOT trigger regeneration.
 *
 * This is in contrast to TimelinePreferences which contains processing/generation parameters.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TimelineDisplayPreferences {

    /**
     * Custom map tile URL for displaying the map.
     * Default: null (use default OpenStreetMap tiles)
     */
    private String customMapTileUrl;

    /**
     * Custom vector map style URL for displaying the map.
     * Default: null (use app default style).
     */
    private String customMapStyleUrl;

    /**
     * Preferred map rendering mode.
     * Default: VECTOR.
     */
    private MapRenderMode mapRenderMode;

    /**
     * Enable GPS path simplification when rendering paths in UI.
     * Default: true
     */
    private Boolean pathSimplificationEnabled;

    /**
     * Douglas-Peucker tolerance for path simplification in meters.
     * Valid range: 1.0 to 100.0
     * Default: 15.0
     */
    private Double pathSimplificationTolerance;

    /**
     * Maximum number of points to display in a path (0 = unlimited).
     * Valid range: 0 to 1000
     * Default: 0
     */
    private Integer pathMaxPoints;

    /**
     * Enable adaptive simplification based on zoom level.
     * Default: true
     */
    private Boolean pathAdaptiveSimplification;

    /**
     * Default date range preset for Timeline, Dashboard and Timeline Reports pages.
     * Allowed values: today, yesterday, lastWeek, lastMonth
     * Default: null (falls back to today/today behavior)
     */
    private String defaultDateRangePreset;

    /**
     * Show telemetry in the current-location popup on Timeline map.
     * Default: true
     */
    private Boolean showCurrentLocationTelemetry;

    /**
     * Automatically show trip replay controls when a trip is selected.
     * Default: true
     */
    private Boolean autoShowTripReplayControls;

    /**
     * Use cached Valhalla map matching for timeline trip path display.
     * Default: false
     */
    private Boolean mapMatchingEnabled;

    /**
     * Whether map matching is enabled globally and configured by an administrator.
     */
    private Boolean mapMatchingAvailable;
}
