import { Point } from "ol/geom";
import { ToolType } from "../types/tools";
import { SatelliteMapsProvider } from "./map";
import Map from "ol/Map";
import { Coordinate } from "ol/coordinate";
import { Mode } from "../store/map";
export interface IRegion {
    id: number
    name: string
}

export interface IDistrict {
    id: number
    name: string
}

export interface IFigure {
    object_id: string,
    figure_type_id: number,
    left: number,
    top: number,
    width: number,
    height: number,
    angle: number,
    points: string | null,
    label_left: number | null,
    label_top: number | null,
    label_angle: number | null,
    label_size: number | null,
    year: number,
    type: number,
    planning: boolean,
    modified?: string
}

export interface ILine {
    object_id: string,
    x1: number,
    y1: number,
    x2: number,
    y2: number,
    points: string | null,
    label_offset: number,
    group_id: string,
    show_label: boolean,
    forced_lengths: string,
    label_sizes: string | null,
    label_angels: string | null,
    label_positions: string | null,
    year: number,
    type: number,
    planning: boolean,
    modified?: string
}

export interface ICitySettings {
    city_id: number;
    image_width: number;
    image_height: number;
    scale: number;
    offset_x: number;
    offset_y: number;
    rotation: number;
    image_scale: number;
}

export interface TypeRole {
    id: number;
    sname: string;
    r: number | null;
    g: number | null;
    b: number | null;
    object_type_id: number;
    object_role_id: number;
    parent_type_id: string | null;
    owner_role_ids: string | null;
    necessary_params_ids: string | null;
    vis_params_ids: string | null;
    read_only_params_ids: string | null;
    inactive_r: number | null;
    inactive_g: number | null;
    inactive_b: number | null;
    color_group: number | null;
}

export interface CreateMapState {
    currentTool: ToolType;
    measureType: "LineString" | "Polygon";
    measureShowSegments: boolean;
    measureClearPrevious: boolean;
    tipPoint: Point | null;
    map: Map | null;
    currentZ: number | undefined;
    currentX: number | undefined;
    currentY: number | undefined;
    currentCoordinate: Coordinate | null;
    statusText: string;
    satMapsProvider: SatelliteMapsProvider;
    selectedObjectType: number | null;
    alignMode: boolean;
    mode: Mode;
    typeRoles: TypeRole[] | null;
    setCurrentCoordinate: (currentCoordinate: Coordinate | null) => void;
    setCurrentZ: (currentZ: number | undefined) => void;
    setCurrentX: (currentX: number | undefined) => void;
    setCurrentY: (currentY: number | undefined) => void;
    setStatusText: (statusText: string) => void;
}