import { StringOrNumber } from '../../../../lib/types';
import { LeafletMouseEvent } from 'leaflet';
export declare enum SourceLayers {
    ONE_WAY = "\"OneWay\"",
    POINT_ADDRESS = "\"PointAddress\"",
    BUILDING_AREA = "\"MapBuildingECArea\"",
    BUILTUP_AREA = "\"MapAdminBuiltupArea\"",
    ADMIN_AREA = "\"MapAdminArea\"",
    OCEAN_AREA = "\"MapOceanArea\"",
    OCEAN_AREA_LABEL = "\"MapOceanAreaLabel\"",
    FACILITY_AREA = "\"MapFacilityArea\"",
    FACILITY_AREA_LABEL = "\"MapFacilityAreaLabel\"",
    LANDUSE_AREA = "\"MapLanduseArea\"",
    LANDUSE_AREA_LABEL = "\"MapLanduseAreaLabel\"",
    NATURE_FIELD = "\"MapNatureField\"",
    NATURE_FOREST = "\"MapNatureForest\"",
    LINK = "\"Link\"",
    RAILROAD_LINK = "\"MapRailroadLink\"",
    WATER_LINK = "\"MapWaterLink\"",
    WATER_AREA = "\"MapWaterArea\"",
    WATER_AREA_LABEL = "\"MapWaterAreaLabel\"",
    WATER_LAKE_LABEL = "\"MapWaterLakeLabel\"",
    POI = "\"POI\"",
    CITY_POI = "\"CityPOI\"",
    CONDITIONS = "\"Conditions\"",
    ROAD_POLY = "\"RoadPoly\"",
    PARKING_LINE = "\"ParkingLine\"",
    LANE_MARKING_LINE = "\"LaneMarkingLine\"",
    LANE_MARKING_POLY = "\"LaneMarkingPoly\"",
    LANE_MARKING_ARROW = "\"LaneMarkingArrow\"",
    TRAFFIC_SIGN = "\"TrafficSign\"",
    TRAFFIC_SIGNAL = "\"TrafficSignal\"",
    CAMERA = "\"Camera\"",
    PILLAR = "\"Pillar\""
}
export type SourceLayerProperties = {
    [SourceLayers.ONE_WAY]: {};
    [SourceLayers.POINT_ADDRESS]: {
        address: string;
        arrival_link_id: string;
        link_id: string;
        point_address_id: string;
        street_address_id: string;
    };
    [SourceLayers.BUILDING_AREA]: {
        feature_type: string;
        height: number;
    };
    [SourceLayers.BUILTUP_AREA]: {};
    [SourceLayers.FACILITY_AREA]: {};
    [SourceLayers.FACILITY_AREA_LABEL]: {};
    [SourceLayers.LANDUSE_AREA]: {};
    [SourceLayers.LANDUSE_AREA_LABEL]: {};
    [SourceLayers.ADMIN_AREA]: {};
    [SourceLayers.OCEAN_AREA]: {};
    [SourceLayers.OCEAN_AREA_LABEL]: {};
    [SourceLayers.ROAD_POLY]: {};
    [SourceLayers.PARKING_LINE]: {};
    [SourceLayers.LANE_MARKING_LINE]: {};
    [SourceLayers.LANE_MARKING_POLY]: {};
    [SourceLayers.LANE_MARKING_ARROW]: {};
    [SourceLayers.LINK]: {};
    [SourceLayers.RAILROAD_LINK]: {};
    [SourceLayers.WATER_LINK]: {};
    [SourceLayers.WATER_AREA]: {};
    [SourceLayers.WATER_AREA_LABEL]: {};
    [SourceLayers.WATER_LAKE_LABEL]: {};
    [SourceLayers.NATURE_FIELD]: {};
    [SourceLayers.NATURE_FOREST]: {};
    [SourceLayers.POI]: {};
    [SourceLayers.CITY_POI]: {};
    [SourceLayers.CONDITIONS]: {};
    [SourceLayers.TRAFFIC_SIGN]: {
        traffic_sign_id: string;
        traffic_sign_number: string;
        have_dop: boolean;
    };
    [SourceLayers.TRAFFIC_SIGNAL]: {
        traffic_signal_id: string;
    };
    [SourceLayers.CAMERA]: {
        camera_id: string;
    };
    [SourceLayers.PILLAR]: {
        pillar_id: string;
    };
};
export type SourceLayerEventHandlers = {
    [K in SourceLayers]?: SourceLayerEventHandler<K>;
};
export type SourceLayerEventHandler<K extends SourceLayers> = {
    click?: (event: SourceLayersMouseEvent<K>) => void;
    hover?: (event: SourceLayersMouseEvent<K>) => void;
};
export type SourceLayersMouseEvent<K extends SourceLayers> = {
    leaflet_event: LeafletMouseEvent;
    properties: SourceLayerProperties[K];
};
export type TangramLeafletLayerEvent = {
    leaflet_event: LeafletMouseEvent;
    feature?: {
        source_layer: SourceLayers;
        properties: any;
    };
};
export type LayerText = {
    order?: number;
    interactive?: boolean;
    text_source: string;
    priority?: string;
    font?: {
        fill?: string;
        size?: StringOrNumber;
        weight?: StringOrNumber;
        underline?: boolean;
        stroke?: {
            color?: string;
            width?: StringOrNumber;
        };
        background?: {
            color?: string;
        };
    };
};
export type TangramPointLayer = {
    texture?: string;
    sprite?: string;
    placement?: 'midpoint' | 'linear' | 'nearest';
    angle?: string;
    size?: StringOrNumber | [number, number];
    order?: number;
    text?: LayerText;
    collide?: boolean;
    interactive?: boolean;
};
export type TangramLayerDrawLines = {
    dash?: [number, number];
    dash_background_color?: [number, number, number, number?];
    color?: string;
    offset?: StringOrNumber;
    width?: StringOrNumber;
    cap?: 'round';
    join?: 'round';
    order?: number;
    interactive?: boolean;
    outline?: {
        color?: string;
        width?: StringOrNumber;
    };
};
export type TangramLayerDraw = {
    polygons?: {
        color?: string;
        order?: StringOrNumber;
        height?: {
            property: 'height';
        };
        interactive?: boolean;
    };
    lines?: TangramLayerDrawLines;
    points?: TangramPointLayer;
    text?: LayerText;
    styles?: {
        [K in string]: {
            color?: string;
            order?: number;
            attributes?: object;
        };
    };
};
export type LayerProps = {
    visible?: boolean;
    filter?: string;
    extruded?: {
        draw?: {
            polygons?: {
                interactive?: boolean;
                style?: string;
                extrude?: string;
            };
        };
    };
    draw?: TangramLayerDraw;
};
export type LayerData = {
    source: string;
    layer: SourceLayers;
    minzoom?: number;
};
export type TextureSprites = {
    [K: string]: [number, number, number, number];
};
export type TangramTextures = {
    [K: string]: {
        url: string;
        filtering: 'mipmap';
        sprites: TextureSprites;
    };
};
export type TangramCustomLayer = LayerProps & {
    readonly id: string;
    data: LayerData;
    sublayers?: {
        [K in string]?: LayerProps;
    };
    textures?: TangramTextures;
};
export type ConfigLayers = {
    [K in string]: TangramCustomLayer;
};
export type ConfigSource = {
    tile_size: number;
    type: string;
    url: string;
};
export type ConfigSources = {
    [K in string]: ConfigSource;
};
export type ConfigStyles = {
    [K in string]: object;
};
export type TangramEventConfig = {
    layers: ConfigLayers;
    sources: ConfigSources;
    textures: TangramTextures;
    styles: ConfigStyles;
};
export type TangramEvent = {
    config: TangramEventConfig;
};
export interface TangramSourceConfig {
    name: TangramSourceNames;
    tile_size: number;
    type: 'MVT' | 'GeoJSON' | 'TopoJSON' | 'Raster';
    url: string;
}
export type TangramScene = {
    updateConfig: (props?: {
        rebuild: boolean;
    }) => void;
    subscribe: (props: {
        load: (event: TangramEvent) => void;
    }) => void;
    setDataSource: (name: string, source: TangramSourceConfig) => Promise<void>;
};
export type TangramLeafletLayer = L.Layer & {
    setSelectionEvents: (props: {
        click?: (event: TangramLeafletLayerEvent) => void;
        hover?: (event: TangramLeafletLayerEvent) => void;
    }) => void;
    scene: TangramScene;
    getContainer: () => HTMLDivElement;
};
export declare enum TangramSourceNames {
    TILE = "tile",
    NATURE_TILE = "nature_tile",
    MSK = "msk"
}
//# sourceMappingURL=types.d.ts.map