/* eslint-disable perfectionist/sort-objects */
var TOOLS = {
    CURSOR: {
        type: 'CURSOR',
        showCursor: true,
        mousedownItem: null,
    },
    PAN: {
        type: 'PAN',
        showCursor: false,
    },
    DRAG_ITEMS: {
        type: 'DRAG_ITEMS',
        showCursor: true,
        items: [],
        wasMovement: false,
    },
    'RECTANGLE.DRAW': {
        // TODO: Adopt this notation for all modes? (i.e. {node}.{type}.{action})
        type: 'RECTANGLE.DRAW',
        // With cursor tile
        showCursor: true,
        // Set target item(rectangle) id for updating store interaction manager
        id: null,
        data: {},
    },
    'RECTANGLE.TRANSFORM': {
        type: 'RECTANGLE.TRANSFORM',
        showCursor: true,
        id: null,
        selectedAnchor: null,
    },
    PLACE_ICON: {
        type: 'PLACE_ICON',
        showCursor: true,
        id: null,
        groupId: null,
    },
    PLACE_ITEM: {
        type: 'PLACE_ITEM',
        showCursor: true,
        id: null,
        iconId: null,
    },
    CONNECTOR: {
        type: 'CONNECTOR',
        showCursor: true,
        id: null,
    },
    TEXTBOX: {
        type: 'TEXTBOX',
        showCursor: false,
        id: null,
    },
    INTERACTIONS_DISABLED: {
        type: 'INTERACTIONS_DISABLED',
        showCursor: false,
    },
};
// TODO: use "key" or "type" for property name?
/** NOTE
 * "toolsList" will be worked only when enabled "TOOL_MENU" in "controlsList".
 * Any tool can be "defaultTool", regardless of those available for user selection from "toolsList".
 */
var MAP_MODES = {
    EDITABLE: {
        key: 'EDITABLE',
        controlsList: ['ITEM_CONTROLS', 'ZOOM_CONTROLS', 'TOOL_MENU', 'MAIN_MENU', 'VIEW_TITLE'],
        toolsList: ['CURSOR', 'PAN', 'RECTANGLE.DRAW', 'PLACE_ICON', 'TEXTBOX'],
        defaultTool: TOOLS.PAN,
        // rectanglesData: {
        //   borderColor: null,
        //   color: null,
        // },
    },
    READONLY: {
        key: 'READONLY',
        controlsList: ['ZOOM_CONTROLS', 'TOOL_MENU', 'VIEW_TITLE'], // , 'MAIN_MENU'
        toolsList: ['PAN'],
        defaultTool: TOOLS.PAN,
        // rectanglesData: {
        //   borderColor: null,
        //   color: null,
        // },
    },
    NON_INTERACTIVE: {
        key: 'NON_INTERACTIVE',
        controlsList: [],
        toolsList: [],
        defaultTool: TOOLS.INTERACTIONS_DISABLED,
        // rectanglesData: {
        //   borderColor: null,
        //   color: null,
        // },
    },
};

export { MAP_MODES, TOOLS };
