import { Color, Position } from '../Core';
import { POI } from './POI';

/**
 * A Surface is a shape that can have a dynamic behaviour.
 */
export interface Surface {
    /**
     * POI owning current Surface.
     */
    readonly poi: POI;
    /**
     * Position in WGS84 coordinates of all the points defining current line.
     * @see {@link Position}
     */
    readonly positions: Position[];
    /**
     * Change the behavior of current Surface.
     * If set to true, it'll be clickable, its color may change while clicked or overflown.
     */
    readonly isInteractive: boolean;
    /**
     * Custom color of the Surface while not clicked or while mouse is hovering.
     * Note that if current Surface has no color it'll use its bundle defined color.
     * To set back current Surface color to bundle's defined, update this member with 'initial' as value.
     */
    readonly color: Color | 'initial';
    /**
     * Color of the Surface while mouse is hovering.
     * Note that if current Surface has no hover color and is interactive, a global hover color would be used @see {@link View~View.surfaceHoverColor | View.surfaceHoverColor}.
     */
    readonly hoverColor?: Color;
    /**
     * Color of the Surface while clicked.
     * Note that if current Surface has no selection color and is interactive, a global hover color would be used @see {@link View~View.surfaceSelectionColor | View.surfaceSelectionColor}.
     */
    readonly selectionColor?: Color;
    /**
     * Height of the displayed shape, relative to its floor ground.
     */
    /**
     * Surface from bundle (defined through VisioMapEditor) aren't removable and are always visible.
     */
    readonly isFromBundle: boolean;
    /**
     * If set to false, current Surface won't be rendered. This flag is not used from surfaces defined through VisioMapEditor.
     * @defaultValue undefined
     */
    readonly isVisible?: boolean;
}
